diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-11-04 16:54:45 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-11-04 16:54:45 +0100 |
commit | 32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6 (patch) | |
tree | 981f08ea494fff473e7cb48687b72c8a30a2399a /tests/security | |
parent | 3986470b3c77240310f51bb101cccf180b9e4c1e (diff) | |
download | forums-32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6.tar forums-32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6.tar.gz forums-32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6.tar.bz2 forums-32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6.tar.xz forums-32881dbe31a945b6d2449a3f7e1bf7c5e73cd0a6.zip |
[ticket/13280] Only run sanitizer for server superglobal and modify tests
PHPBB3-13280
Diffstat (limited to 'tests/security')
-rw-r--r-- | tests/security/extract_current_page_test.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php index 8e536ee461..c127b69b2b 100644 --- a/tests/security/extract_current_page_test.php +++ b/tests/security/extract_current_page_test.php @@ -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); } } |