Skip to content

Commit 18eaf1e

Browse files
M-SlanecMatthew Slanec
authored andcommitted
policies/password: Fix amount_uppercase in password policy check (#16197)
Fix amount_uppercase in password policy check Co-authored-by: Matthew Slanec <matthewslanec@Matthews-MacBook-Pro.local>
1 parent 93cb48c commit 18eaf1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

authentik/policies/password/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def passes_static(self, password: str, request: PolicyRequest) -> PolicyResult:
103103
if self.amount_lowercase > 0 and len(RE_LOWER.findall(password)) < self.amount_lowercase:
104104
LOGGER.debug("password failed", check="static", reason="amount_lowercase")
105105
return PolicyResult(False, self.error_message)
106-
if self.amount_uppercase > 0 and len(RE_UPPER.findall(password)) < self.amount_lowercase:
106+
if self.amount_uppercase > 0 and len(RE_UPPER.findall(password)) < self.amount_uppercase:
107107
LOGGER.debug("password failed", check="static", reason="amount_uppercase")
108108
return PolicyResult(False, self.error_message)
109109
if self.amount_symbols > 0:

0 commit comments

Comments
 (0)