-
Notifications
You must be signed in to change notification settings - Fork 689
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
0.9.0-rc2 does not allow text only submissions #3758
Comments
Thanks for this report, I was unable to reproduce this on |
I can confirm the error. I see the same error message.
|
Found the cause will update the ticket + a PR after some coffee. |
Now we check if there is any uploaded file in the request object before accessing it. This was causing error if the 'fh' key was missing in the request.files.
Based on my testing, this bug does not occur in Dev, nor in Staging environments. It only happens in production (either VMs or hardware). I rebuilt the debs on another computer to rule out the possibility of a bad build, and observed the same error described by @b-meson . |
Why does this issue not occur in dev or staging? |
|
Fixes #3758 checks file value before accessing it
Reopening until root cause of variance between staging and prod is addressed |
Now we check if there is any uploaded file in the request object before accessing it. This was causing error if the 'fh' key was missing in the request.files. (cherry picked from commit 4132731)
Confirmed that staging VMs do not show this issue: I'm able to submit both text and files without issue against staging VMs, configured from |
Description
I believe I found a bug in upgrading from
0.8
to0.9rc2
in that sources can only submit documents or documents and messages. If I try to send only text or a blank form field I get a "Bad Request, the browser or proxy sent a request that this server could not understand" error.Steps to Reproduce
First I installed 0.8.0 on hardware and create a journalist. I then ran ./qa-loader.py -m 25. I logged in and and see submissions. I then added the apt-test key and updated sources.list to
apt.freedom.press
toapt-test.freedom.press
. Finally I ransudo cron-apt -i -s
to update to0.9rc2
Expected Behavior
A source can send text to journalists.
Actual Behavior
Error in the webapp.
Comments
I also enabled apache debug logging and attempted to patch the source_app/ code to log anything related to CSRF violations and I was was not able to trigger a debug log.
The text was updated successfully, but these errors were encountered: