mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Do not allow to upload SVG logos with embedded raster images in them
Those are for example png or jpg images. They do not render properly.
This commit is contained in:
@@ -42,6 +42,7 @@ from app.main.validators import (
|
||||
LettersNumbersAndFullStopsOnly,
|
||||
MustContainAlphanumericCharacters,
|
||||
NoCommasInPlaceHolders,
|
||||
NoEmbeddedImagesInSVG,
|
||||
OnlySMSCharacters,
|
||||
ValidEmail,
|
||||
ValidGovEmail,
|
||||
@@ -1133,7 +1134,8 @@ class SVGFileUpload(StripWhitespaceForm):
|
||||
'Upload an SVG logo',
|
||||
validators=[
|
||||
FileAllowed(['svg'], 'SVG Images only!'),
|
||||
DataRequired(message="You need to upload a file to submit")
|
||||
DataRequired(message="You need to upload a file to submit"),
|
||||
NoEmbeddedImagesInSVG()
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user