Skip to content

Commit

Permalink
fix: mark passwords as sensitive POST data
Browse files Browse the repository at this point in the history
Closes #1893, closes #1869
  • Loading branch information
dojutsu-user authored and jerivas committed Sep 24, 2021
1 parent 872b0cd commit c0c3d76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mezzanine/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.template.response import TemplateResponse
from django.urls import NoReverseMatch, get_script_prefix
from django.utils.translation import gettext_lazy as _
from django.views.decorators.debug import sensitive_post_parameters

from mezzanine.accounts import get_profile_form
from mezzanine.accounts.forms import LoginForm, PasswordResetForm
Expand All @@ -17,6 +18,7 @@
User = get_user_model()


@sensitive_post_parameters("password")
def login(
request,
template="accounts/account_login.html",
Expand Down Expand Up @@ -46,6 +48,7 @@ def logout(request):
return redirect(next_url(request) or get_script_prefix())


@sensitive_post_parameters("password1", "password2")
def signup(request, template="accounts/account_signup.html", extra_context=None):
"""
Signup form.
Expand Down Expand Up @@ -132,6 +135,7 @@ def account_redirect(request):
return redirect("profile_update")


@sensitive_post_parameters("password1", "password2")
@login_required
def profile_update(
request, template="accounts/account_profile_update.html", extra_context=None
Expand Down

0 comments on commit c0c3d76

Please sign in to comment.