1
0
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:
Marc Alexander
2014-11-04 16:54:45 +01:00
parent 3986470b3c
commit 32881dbe31
2 changed files with 9 additions and 4 deletions

View File

@@ -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);
}
}