You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was introduced in #4425 (only in develop, not in production or any release branches) and is due to a missing CSRF token in the password reset form (a CSRFError exception will be thrown - these are handled in journalist_app/__init__py so no traceback occurs, but the form still won't validate):
diff --git a/securedrop/journalist_templates/edit_account.html b/securedrop/journalist_templates/edit_account.html
index fc54f2ebc..11f55cef3 100644
--- a/securedrop/journalist_templates/edit_account.html+++ b/securedrop/journalist_templates/edit_account.html@@ -58,6 +58,7 @@
<form action="{{ password_reset_url }}" method="post" id="new-password" class="login-form">
{% if not user or g.user == user %}
+ <input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<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 %}
A fix needs a regression unit or functional test
The text was updated successfully, but these errors were encountered:
Description
Bug discovered by @lev-csouffrant.
Steps to Reproduce
Expected Behavior
Actual Behavior
Comments
This was introduced in #4425 (only in develop, not in production or any release branches) and is due to a missing CSRF token in the password reset form (a CSRFError exception will be thrown - these are handled in
journalist_app/__init__py
so no traceback occurs, but the form still won't validate):A fix needs a regression unit or functional test
The text was updated successfully, but these errors were encountered: