mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Fix: fix app logo validation with no file (#10599)
This commit is contained in:
parent
d878bc153a
commit
521fd1c957
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue