Skip to content

Commit 54c0642

Browse files
fix: Check if password contains the duble quote
1 parent e4b3de8 commit 54c0642

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/models/validators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def validate_password(value: str | None, check_username: str | None = None):
102102
if check_username and check_username.lower() in value.lower():
103103
errors.append("Password cannot contain the username")
104104

105+
# Check if password contains the duble quote
106+
if '"' in value:
107+
errors.append('Password cannot contain the double quote (") character')
108+
105109
if errors:
106110
raise ValueError("; ".join(errors))
107111
return value

0 commit comments

Comments
 (0)