mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/13280] Only run sanitizer for server superglobal and modify tests
PHPBB3-13280
This commit is contained in:
@@ -84,8 +84,13 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
|
||||
|
||||
protected function sanitizer($value)
|
||||
{
|
||||
// Fix for objects passed in phpunit
|
||||
if (is_object($value))
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
$type_cast_helper = new \phpbb\request\type_cast_helper();
|
||||
$type_cast_helper->set_var($value, $value, gettype($value), true);
|
||||
return $value;
|
||||
return str_replace('&', '&', $value);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user