mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-18 00:46:25 +00:00
Fix: fix app logo validation with no file (#10599)
This commit is contained in:
@@ -209,7 +209,7 @@ class ApplicationConfigurationSerializer(serializers.ModelSerializer):
|
|||||||
return super().update(instance, validated_data)
|
return super().update(instance, validated_data)
|
||||||
|
|
||||||
def validate_app_logo(self, file):
|
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)
|
reject_dangerous_svg(file)
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user