From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 17 Aug 2025 14:19:50 +0000 (-0700) Subject: Fix: fix app logo validation with no file (#10599) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;p=thirdparty%2Fpaperless-ngx.git Fix: fix app logo validation with no file (#10599) --- diff --git a/src/paperless/serialisers.py b/src/paperless/serialisers.py index 3398d53d1..754a3c594 100644 --- a/src/paperless/serialisers.py +++ b/src/paperless/serialisers.py @@ -209,7 +209,7 @@ class ApplicationConfigurationSerializer(serializers.ModelSerializer): return super().update(instance, validated_data) def validate_app_logo(self, file): - if magic.from_buffer(file.read(2048), mime=True) == "image/svg+xml": + if file and magic.from_buffer(file.read(2048), mime=True) == "image/svg+xml": reject_dangerous_svg(file) return file