Skip to content

Commit

Permalink
password checker issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdevjin committed Oct 25, 2024
1 parent 0921a2a commit b0cd029
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/password_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def check_strength(self, password):
else:
feedback.append("Password should contain at least one uppercase letter")

# Bug: Incorrect number checking
if password[0].isdigit(): # Bug is here - only checks first character
# Corrected number checking
if any(c.isdigit() for c in password): # Fixed here
score += 1
else:
feedback.append("Password should contain at least one number")
Expand Down

0 comments on commit b0cd029

Please sign in to comment.