Update src/Model/User.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
very-ape 2021-05-20 11:54:30 -07:00 committed by GitHub
parent d66f1e30ae
commit e2d93b57da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ class User
// exactly what will happen here. Creating a numeric username would create
// abiguity with user IDs, possibly opening up an attack vector.
// So let's be very careful about that.
if (empty($username) || is_numeric($user_info) || is_numeric($user_info['nickname'] ?? '')) {
if (empty($username) || is_numeric($username)) {
throw $e;
}