mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-16 13:52:03 +02:00
[ticket/security/254] Disallow whitespace characters that might be invisible
SECURITY-254
This commit is contained in:
parent
ed33f06235
commit
f302440297
@ -1752,7 +1752,8 @@ function validate_username($username, $allowed_username = false, $allow_all_name
|
||||
}
|
||||
|
||||
// ... fast checks first.
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username))
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username)
|
||||
|| preg_match('/[\x{180E}\x{2005}-\x{200D}\x{202F}\x{205F}\x{2060}\x{FEFF}]/u', $username))
|
||||
{
|
||||
return 'INVALID_CHARS';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user