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>
This commit is contained in:
M-Slanec
2025-08-15 08:51:43 -04:00
committed by GitHub
parent 5b7a42e6d6
commit 20d068f767
+1 -1
View File
@@ -103,7 +103,7 @@ class PasswordPolicy(Policy):
if self.amount_lowercase > 0 and len(RE_LOWER.findall(password)) < self.amount_lowercase:
LOGGER.debug("password failed", check="static", reason="amount_lowercase")
return PolicyResult(False, self.error_message)
if self.amount_uppercase > 0 and len(RE_UPPER.findall(password)) < self.amount_lowercase:
if self.amount_uppercase > 0 and len(RE_UPPER.findall(password)) < self.amount_uppercase:
LOGGER.debug("password failed", check="static", reason="amount_uppercase")
return PolicyResult(False, self.error_message)
if self.amount_symbols > 0: