diff --git a/src/paperless/serialisers.py b/src/paperless/serialisers.py index af9a3c511..fafbb914c 100644 --- a/src/paperless/serialisers.py +++ b/src/paperless/serialisers.py @@ -256,6 +256,10 @@ class ApplicationConfigurationSerializer(serializers.ModelSerializer): image.close() def validate_app_logo(self, file: UploadedFile): + """ + Validates and sanitizes the uploaded app logo image. Model field already restricts to + jpg/png/gif/svg see src/paperless/models.py#L200 + """ if not file: return file diff --git a/src/paperless/validators.py b/src/paperless/validators.py index 5de9f972d..eaa590a38 100644 --- a/src/paperless/validators.py +++ b/src/paperless/validators.py @@ -264,7 +264,7 @@ def validate_raster_image(file: UploadedFile) -> None: """ Validates that the uploaded file is a valid raster image (JPEG, PNG, etc.) and does not exceed maximum pixel limits. - Raises ValidationError if the image is invalid or potentially dangerous. + Raises ValidationError if the image is invalid or exceeds the allowed size. """ file.seek(0)