-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading a big PNG file as an institution's logo breaks the portal #1442
Comments
Possibly related to #1198. Can I ask what the frontend error looked like? FYI, it should validate the image size (I think 5MB is the limit), but some weird interaction between the proxy server and the Play app was causing a crash here I never managed to solve. This could be a different issue though. I got a load of |
The error was a blank page. Then, I reloaded the page and I received an error message saying that the service was down (I don't really remember the wording, but it was the typical error when the portal goes down). I will send you the image by email. |
Crash is caused by very high resolution PNG exhausting heap space when trying to create a thumbnail, even when the PNG is below the 5MB max image size. Need to add a validator for some maximum resolution without loading the image into memory. |
Fixes a potential DOS when an image is uploaded that is below the maximum file size but uses masses of memory to process. Also extract validation logic into a separate helper shared by user profile and repositories controller. Fixes EHRI#1442
Fixes a potential DOS when an image is uploaded that is below the maximum file size but uses masses of memory to process. Also extract validation logic into a separate helper shared by user profile and repositories controller. Additionally, allows removing a profile image by leaving the image field empty in the upload form, which previously wasn't possible. Fixes EHRI#1442
Fixes a potential DOS when an image is uploaded that is below the maximum file size but uses masses of memory to process. Also extract validation logic into a separate helper shared by user profile and repositories controller. Additionally, allows removing a profile image by leaving the image field empty in the upload form, which previously wasn't possible. Fixes #1442
I tried to upload an image (in PNG) as an institution's log bigger than 1MB and the portal crashed. The PNG was created using a SVG file which was exported with high resolution. It would be better to validate the file and/or handling the error.
The text was updated successfully, but these errors were encountered: