mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/10931] Correctly handle inputs such as '-k' as invalid in get_bytes().
PHPBB3-10931
This commit is contained in:
@@ -137,10 +137,17 @@ class phpbb_php_ini
|
||||
|
||||
if (is_numeric($value))
|
||||
{
|
||||
// Already in bytes.
|
||||
return $value;
|
||||
}
|
||||
else if (strlen($value) < 2)
|
||||
{
|
||||
// Single character.
|
||||
return false;
|
||||
}
|
||||
else if (strlen($value) < 3 && $value[0] === '-')
|
||||
{
|
||||
// Two characters but the first one is a minus.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user