Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow a disabled user to reset their password #478

Open
GraemeWatt opened this issue Mar 28, 2024 · 0 comments
Open

Don't allow a disabled user to reset their password #478

GraemeWatt opened this issue Mar 28, 2024 · 0 comments
Labels

Comments

@GraemeWatt
Copy link

user = self.get_user(**kwargs)
self.send_reset_password_instructions(user)

Between these two lines a check should be added that the user's account is active:

if not user.is_active:
    _abort(get_message("DISABLED_ACCOUNT")[0])

With the current behaviour, a disabled user is still sent an email enabling them to reset their password, after which a message is displayed "You successfully reset your password and you have been logged in automatically" although they are not logged in.

@GraemeWatt GraemeWatt added the bug label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant