mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/security/254] Disallow whitespace characters that might be invisible
SECURITY-254
This commit is contained in:
parent
ed33f06235
commit
f302440297
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue