From ec75632bcbc7baf5448317ca86d03f672a321f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <83654397+tgaullier@users.noreply.github.com> Date: Wed, 6 May 2026 19:38:55 +0200 Subject: [PATCH 1/2] [FIX] password_security: accept extra kwargs in do_signup 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. --- password_security/__manifest__.py | 2 +- password_security/controllers/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/password_security/__manifest__.py b/password_security/__manifest__.py index 958bbe906d..c2e4273518 100644 --- a/password_security/__manifest__.py +++ b/password_security/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Password Security", "summary": "Allow admin to set password security requirements.", - "version": "17.0.2.0.0", + "version": "17.0.2.0.1", "author": "LasLabs, " "Onestein, " "Kaushal Prajapati, " diff --git a/password_security/controllers/main.py b/password_security/controllers/main.py index c780ef48a5..2df805af77 100644 --- a/password_security/controllers/main.py +++ b/password_security/controllers/main.py @@ -15,11 +15,11 @@ class PasswordSecurityHome(AuthSignupHome): - def do_signup(self, qcontext): + def do_signup(self, qcontext, **kw): password = qcontext.get("password") user = request.env.user user._check_password(password) - return super().do_signup(qcontext) + return super().do_signup(qcontext, **kw) @http.route() def web_login(self, *args, **kw): From 98321516491cd3ff553184bf6efee2ee8607de3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <83654397+tgaullier@users.noreply.github.com> Date: Wed, 6 May 2026 20:01:24 +0200 Subject: [PATCH 2/2] [FIX] password_security: update tests to use valid email format 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. --- password_security/tests/test_signup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/password_security/tests/test_signup.py b/password_security/tests/test_signup.py index b600f4cd12..3c988d83c0 100644 --- a/password_security/tests/test_signup.py +++ b/password_security/tests/test_signup.py @@ -44,7 +44,7 @@ def signup(self, username, password): def test_01_signup_user_fail(self): """It should fail when signup user with weak password""" # Weak password: signup failed - response = self.signup("jackoneill", "jackoneill") + response = self.signup("jackoneill@example.com", "jackoneill") # Ensure we stay in the signup page self.assertEqual(response.request.path_url, "/web/signup") @@ -57,7 +57,7 @@ def test_01_signup_user_fail(self): def test_02_signup_user_success(self): """It should succeed when signup user with strong password""" # Weak password: signup failed - response = self.signup("jackoneill", "!asdQWE12345_3") + response = self.signup("jackoneill@example.com", "!asdQWE12345_3") # Ensure we were logged in self.assertEqual(