Skip to content
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

Fixes #3758 checks file value before accessing it #3763

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

kushaldas
Copy link
Contributor

Status

Ready for review

Description of Changes

Fixes #3758

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.

Testing

Try to submit only message, and then only upload a file,
and finally upload both message and a file at the same time
using source interface.

Deployment

Any special considerations for deployment? Consider both:

  1. Upgrading existing production instances.
  2. New installs.

Checklist

If you made changes to the server application code:

  • Linting (make ci-lint) and tests (make -C securedrop test) pass in the development container

If you made changes to securedrop-admin:

  • Linting and tests (make -C admin test) pass in the admin development container

If you made changes to the system configuration:

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

If you made changes to documentation:

  • Doc linting (make docs-lint) passed locally

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.
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kushaldas ! I can confirm this addresses the issue. As a source I can now submit plaintext.

@emkll emkll merged commit 6098d75 into freedomofpress:develop Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants