-
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
DELETE methods not allowed by apache journalist interface config #3977
Comments
We discussed this bug today in the engineering meeting and decided that the way to resolve is to modify the journalist apache config, and request admins that want to use the journalist API to run This does mean that we'll need to be extremely careful when making any other Apache config changes in the future (until we have a better story regarding minimizing config drift across instances - insert obligatory ansible pull reference #3136 which is looking like a pretty good way forward in the medium term imho). |
Also, when we resolve this via updating the journalist apache config template, we should also resolve #3877 at that time |
Description
This is the issue causing freedomofpress/securedrop-client#173
Steps to Reproduce
Expected Behavior
{"message":"Star removed"}
Actual Behavior
A 403 occurs, and we get redirected to the login page.
This redirect-for-403 behavior only happens for the API in staging because Apache is sending 403s to
/notfound
, causing therequest.path
to be/notfound
(instead of something that begins withthisismeonion.onion/api/blahhh
), meaning that code execution will continue until the redirect here.Comments
The cause is the 403, and this is happening because of the LimitExcept directive we are using in the Apache configs. These allow only GET POST and HEAD requests.
To prove this to oneself, you can edit
/etc/apache2/sites-enabled/journalist.conf
and add DELETE as an allowed request method.This is similar to bugs #3772 and #3877. In light of this we should:
The text was updated successfully, but these errors were encountered: