Fix an issue where user login is not working if username/email contains single quote in server mode. #6865

This commit is contained in:
Khushboo Vashi
2023-10-17 13:49:18 +05:30
parent 205a661922
commit b4b2a4ff67
3 changed files with 5 additions and 4 deletions

View File

@@ -668,7 +668,7 @@ def utils():
mfa_enabled=is_mfa_enabled(),
is_admin=current_user.has_role("Administrator"),
login_url=login_url,
username=current_user.username,
username=current_user.username.replace("'","\\'"),
auth_source=auth_source,
heartbeat_timeout=config.SERVER_HEARTBEAT_TIMEOUT,
password_length_min=config.PASSWORD_LENGTH_MIN,