We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ba09fa commit 9a54d04Copy full SHA for 9a54d04
Bugzilla/User.pm
@@ -326,8 +326,13 @@ sub check_login_name_for_creation {
326
my ($invocant, $name) = @_;
327
$name = trim($name);
328
$name || ThrowUserError('user_login_required');
329
- validate_email_syntax($name)
330
- || ThrowUserError('illegal_email_address', {addr => $name});
+
+ # No whitespace
331
+ $name !~ /\s/ || ThrowUserError('login_illegal_character');
332
333
+ # We set the max length to 127 to ensure logins aren't truncated when
334
+ # inserted into the tokens.eventdata field.
335
+ length($name) <= 127 or ThrowUserError('login_too_long');
336
337
# Check the name if it's a new user, or if we're changing the name.
338
if (!ref($invocant) || $invocant->login ne $name) {
0 commit comments