aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/auth.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/auth.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/webmentions_ssg/auth.py b/webmentions_ssg/auth.py
index 209bdd6..1707917 100644
--- a/webmentions_ssg/auth.py
+++ b/webmentions_ssg/auth.py
@@ -15,6 +15,7 @@ from flask_login import LoginManager
from .extensions import db
from .models import User
+from .validation import is_control_character
AUTH = LoginManager()
@@ -38,7 +39,7 @@ def validate_password(password: str) -> None:
raise ValueError(
f"Password must be at least {MIN_PASSWORD_LENGTH} characters long."
)
- if any(ord(char) < 32 or ord(char) == 127 for char in password):
+ if any(is_control_character(char) for char in password):
raise ValueError("Password must not contain control characters.")