Skip to content

Commit

Permalink
feat(auth): no "unknown_account" email message when random password r…
Browse files Browse the repository at this point in the history
…eset
  • Loading branch information
thejoeejoee committed Dec 9, 2024
1 parent 5e305d2 commit 79cc62a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fiesta/apps/accounts/forms/reset_password.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import annotations

from allauth.account.forms import ResetPasswordForm as BaseResetPasswordForm


class ResetPasswordForm(BaseResetPasswordForm):
def _send_unknown_account_mail(self, request, email):
# allauth==0.54.0 sends an email in case of password reset and email not found
# we override this method to prevent sending email in case of email not founding

return
1 change: 1 addition & 0 deletions fiesta/fiesta/settings/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class AuthConfigMixin:

ACCOUNT_FORMS = {
"signup": "apps.accounts.forms.sign_up.SignupForm",
"reset_password": "apps.accounts.forms.reset_password.ResetPasswordForm",
}

ACCOUNT_EMAIL_VERIFICATION = "mandatory"
Expand Down

0 comments on commit 79cc62a

Please sign in to comment.