-
Notifications
You must be signed in to change notification settings - Fork 687
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
Back out functionality requiring libjpeg-dev apt dependency #3379
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3379 +/- ##
===========================================
- Coverage 85.81% 85.79% -0.02%
===========================================
Files 34 34
Lines 2157 2154 -3
Branches 238 238
===========================================
- Hits 1851 1848 -3
Misses 250 250
Partials 56 56
Continue to review full report at Codecov.
|
securedrop/journalist_app/forms.py
Outdated
message=gettext("You can only upload JPG/JPEG" | ||
" or PNG image files.")) | ||
FileAllowed(['png'], | ||
message=gettext("You can only upload PNG image files.")) |
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.
If we change that to Upload images only. it will alow us to re-use a former translation instead of asking them for a last minute change.
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.
I think that's fair since this is a last minute change. I've modified this to reuse this translation ✅.
Once this PR is merged, I'll prepare a PR (not for 0.7.0 😇) changing the string to "You can only upload PNG image files." since that's more clear for end users.
Also backs out handling of JPEG images in the custom logo and removes the resizing logic. This will need to be brought back in at a later date when we can add libjpeg-dev as an apt dependency.
687f633
to
6b63b78
Compare
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.
💯
Status
Ready for review
Description of Changes
Fixes #3375. Fixes #3316. Re-opens #2807 ("Re-opens" is not a keyword so the merger of this PR should be sure the ticket is indeed re-opened).
Changes proposed in this pull request:
libjpeg-dev
and thusPillow
. The functionality change is that we won't be able to accept JPG/JPEG logos (a lesser issue) and we won't be able to resize images server-size (a greater issue, as such this part is unfortunate). Note that we could potentially implement a roundabout way to do this, but I advocate we just fix the fact that we can't safely addlibjpeg-dev
, and then bring in the changes again.🌏Note 🌏
This involves a string change, which I apologize for. I could not find a way to reuse old strings on the interface that would not be very awkward. Suggestions are welcome here.Testing
Deployment
This can be safely deployed to instances
Checklist
If you made changes to the server application code:
make ci-lint
) and tests (make -C securedrop test
) pass in the development containerIf you made changes to the system configuration:
If you made changes to documentation:
make docs-lint
) passed locally