Skip to content

Commit

Permalink
Merge pull request #4498 from zenmonkeykstop/4463-csrf-reset-password
Browse files Browse the repository at this point in the history
Fixes CSRF error on JI password reset
  • Loading branch information
redshiftzero authored Jun 3, 2019
2 parents d164ece + 9f136bd commit 5d5ba25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions securedrop/journalist_templates/edit_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ <h2>{{ gettext('Reset Password') }}</h2>
<p><input type="password" name="current_password" placeholder="{{ gettext('Current Password') }}"></p>
<p><input name="token" id="token" type="text" placeholder="{{ gettext('Two-factor Code') }}"></p>
{% endif %}
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<input name="password" type="hidden" value="{{ password }}">
<p>
{% if user %}
Expand Down
1 change: 1 addition & 0 deletions securedrop/tests/functional/functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def sd_servers(self):

self.source_app = source_app.create_app(config)
self.journalist_app = journalist_app.create_app(config)
self.journalist_app.config['WTF_CSRF_ENABLED'] = True

self.__context = self.journalist_app.app_context()
self.__context.push()
Expand Down

0 comments on commit 5d5ba25

Please sign in to comment.