mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 23:42:59 +00:00
restore trimming of username input
continue to not trim password or custom fields trailing/leading space is explicitly forbidden in validate_username
This commit is contained in:
@@ -256,6 +256,9 @@ class Authenticator(LoggingConfigurable):
|
||||
if not username:
|
||||
# empty usernames are not allowed
|
||||
return False
|
||||
if username != username.strip():
|
||||
# starting/ending with space is not allowed
|
||||
return False
|
||||
if not self.username_regex:
|
||||
return True
|
||||
return bool(self.username_regex.match(username))
|
||||
|
Reference in New Issue
Block a user