pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
1.63k stars 513 forks source link

adds relevant user to reset password form for validation purposes #835

Open fuhrysteve opened 5 years ago

fuhrysteve commented 5 years ago

I need a way to check password complexity, including relevant information about the user (such as their first and last name). Currently ResetPasswordForm has no mechanism for doing this, since current_user is AnonymousUser at this point.

This simply tacks on user from the token so that the ResetPasswordForm can fully implement complexity checks against the proposed user-to-change's data as extra dictionary items (example of the sort of checks I'd like to perform here: https://github.com/dwolfhub/zxcvbn-python#usage)