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

[1.3.0] Backport use of WTForm for source interface submission form #5230

Merged
merged 1 commit into from
May 5, 2020

Conversation

zenmonkeykstop
Copy link
Contributor

Status

Ready for review

Description of Changes

Backports #5226.

Backports the PR to use WTForm for the source interface submission form, enforcing a max length of 100000 chars on message submissions.

Testing

Adds SubmissionForm to securedrop/source_app/forms.py, supporting
validation of the source submission form. Rework lookup.html to use
it: some presentation (the placeholder) had to be moved to the form,
because the translated message couldn't be interpolated into the
SubmissionForm construction in the template.

Note that this change does *not* add the maxlength attribute to the
message textarea, as Firefox doesn't limit the text length accurately
when it includes newlines and can submit a message longer than the
validator limit.

(cherry picked from commit 412103d)
@zenmonkeykstop zenmonkeykstop added this to the 1.3.0 milestone May 4, 2020
@zenmonkeykstop zenmonkeykstop changed the base branch from develop to release/1.3.0 May 4, 2020 20:59
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, good to merge when CI passes

@kushaldas kushaldas merged commit 22f026a into release/1.3.0 May 5, 2020
@zenmonkeykstop zenmonkeykstop deleted the backport-wtform-maxlen branch May 7, 2020 01:31
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.

4 participants