[FIX] password_security: accept extra kwargs in do_signup#940
Open
[FIX] password_security: accept extra kwargs in do_signup#940
Conversation
Odoo 17's standard auth_signup controller calls do_signup(qcontext, validate_email=...) but the password_security override of do_signup does not accept this keyword argument, causing a crash on password reset: TypeError: PasswordSecurityHome.do_signup() got an unexpected keyword argument 'validate_email' Update the override to accept and forward extra keyword arguments, which also makes it more robust to future API changes.
Odoo 17 standard auth_signup validates email format on signup. Tests now use a valid email as login to be consistent with Odoo 17 behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #939
Problem
Odoo 17's standard
auth_signupcontroller callsdo_signup(qcontext, validate_email=...). Thepassword_securityoverride ofdo_signupdoes not accept this keyword argument, causing the following crash on password reset:This is reproducible with
password_securityalone, no other OCA auth module needs to be installed.Fix
Update the
do_signupoverride to accept and forward extra keyword arguments via**kw. This fixes the immediate issue and makes the override robust to future signature changes in Odoo standard.