Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion password_security/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, "
Expand Down
4 changes: 2 additions & 2 deletions password_security/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions password_security/tests/test_signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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(
Expand Down
Loading