-
Notifications
You must be signed in to change notification settings - Fork 275
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
Issue 670. Image Upload Validation. #1164
Conversation
✅ Deploy Preview for activist-org ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thank you for the pull request! ❤️The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
The header validation rules are on me, @mattburnett-repo. We had a dependency issue and the build's a bit weird because of it right now. I'll get it fixed soon. |
Frontend tests are going to fail on the above build, @mattburnett-repo. The header rules are fixed, but for some reason we're getting a frontend error in node_modules right now 🤔 If you have any suggestions here, feel free to let us know! Obviously not a part of what you're doing here, but figured I'd ask :) CC @Abhi-Bohora who I'll also ask about this in #1166 |
Added security key to nuxt.config.ts. Currently configures CSP header, logger and request size. CSP modified to allow image display/retrieval from api.
Added function scrub_exif to content/serializers.py.
Fixed Image / ImageFile type mismatch error from deployment check.
Cast line 49 img as PILImage.Image type.
Cleanup for content/serializer.py. Added rateLimiter to nuxt.config.ts/security settings.
Let me know when this is ready for review, @mattburnett-repo :) We'll likely look at it during the sync or maybe Saturday beforehand 😊 |
Maybe remove the WIP from the title if it is :) |
There's always more to do (cf. the 'to do' items above) @andrewtavis , but this PR currently covers the important points in #670 and can be considered as done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All's looking great here, @mattburnett-repo! Thanks for the great work and the nice review session 😊
Contributor checklist
Description
This PR addresses the issues presented in #670 .
Backend
Frontend
To do
Backend:
Decide if we want to implement pyClamd or something similar for image file scanning. This could be run as a service in Docker.
Frontend:
Configure access-control-allow-origin: * header in nuxt-security. Likely need to use VITE_FRONTEND_URL env var.
Decide if we want to implement DOM purify.
Needs tests (vitest and Playwright).
'Delete image' functionality (front and backend).
Related issue