Use LenientForm instead Form for CSRF protected pages #751

Merged
KitaitiMakoto merged 1 commits from csrf-token-in-form into master 4 years ago
KitaitiMakoto commented 4 years ago (Migrated from github.com)

Hi,

I found that password reset request(POST /password-reset) and password reset(POST /password-reset/<token>) cause 422 Unprocessable Entity because Plume attempts to parse csrf-token in form to model fields. Using LenientForm instead of Form solved this problem.

Hi, I found that password reset request(`POST /password-reset`) and password reset(`POST /password-reset/<token>`) cause 422 Unprocessable Entity because Plume attempts to parse `csrf-token` in form to model fields. Using `LenientForm` instead of `Form` solved this problem.
codecov[bot] commented 4 years ago (Migrated from github.com)

Codecov Report

Merging #751 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
- Coverage   39.01%   39.00%   -0.02%     
==========================================
  Files          73       73              
  Lines        9699     9699              
  Branches     2229     2229              
==========================================
- Hits         3784     3783       -1     
+ Misses       4787     4753      -34     
- Partials     1128     1163      +35     
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/751?src=pr&el=h1) Report > Merging [#751](https://codecov.io/gh/Plume-org/Plume/pull/751?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/c217e5e9b342304740623a4e9a8c3f189cea6f1c&el=desc) will **decrease** coverage by `0.01%`. > The diff coverage is `0.00%`. ```diff @@ Coverage Diff @@ ## master #751 +/- ## ========================================== - Coverage 39.01% 39.00% -0.02% ========================================== Files 73 73 Lines 9699 9699 Branches 2229 2229 ========================================== - Hits 3784 3783 -1 + Misses 4787 4753 -34 - Partials 1128 1163 +35 ```
elegaanz (Migrated from github.com) approved these changes 4 years ago
elegaanz (Migrated from github.com) left a comment

Thanks :)

Thanks :)
KitaitiMakoto commented 4 years ago (Migrated from github.com)

Thank you for meeting!

Thank you for meeting!

Reviewers

The pull request has been merged as 71e0a35e06.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b csrf-token-in-form master
git pull origin csrf-token-in-form

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff csrf-token-in-form
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#751
Loading…
There is no content yet.