Skip to content

Commit

Permalink
Merge pull request #11 from BWibo/patch-1
Browse files Browse the repository at this point in the history
Fix pwd validation
  • Loading branch information
blagojabozinovski authored Jul 3, 2024
2 parents 8626e20 + 28549ea commit 55399c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/password_policy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def custom_password_check(password):
lowercase_error = re.search(r"[a-z]", password) is None

# searching for symbols
symbol_error = re.search(r"[ !#$%&'()*+,-./[\\\]^_`{|}~"+r'"]', password) is None
symbol_error = re.search(r"[ !#$%&@'()*+,-./[\\\]^_`{|}~"+r'"]', password) is None

# overall result
password_ok = not ( length_error or digit_error or uppercase_error or lowercase_error or symbol_error )
Expand All @@ -77,4 +77,4 @@ def lockout_time():
return alert
else:
alert = f"You failed 3 atempts to login and you have been locked out for {time_to_int} seconds. Try again later."
return alert
return alert

0 comments on commit 55399c6

Please sign in to comment.