diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2013-12-21 16:31:20 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2013-12-21 16:31:20 +0100 |
| commit | 235d2069e0e7cecfd51d4eed5c875cc865f35486 (patch) | |
| tree | 20f6ad44215d47cfe61ea65075b007de96585d72 /tests | |
| parent | 15913fdf79b8e41049e3263e5e27e6690effc65e (diff) | |
| download | forums-235d2069e0e7cecfd51d4eed5c875cc865f35486.tar forums-235d2069e0e7cecfd51d4eed5c875cc865f35486.tar.gz forums-235d2069e0e7cecfd51d4eed5c875cc865f35486.tar.bz2 forums-235d2069e0e7cecfd51d4eed5c875cc865f35486.tar.xz forums-235d2069e0e7cecfd51d4eed5c875cc865f35486.zip | |
[ticket/11997] Allow redirects to parent folders like previously
Redirects to parent folders were possible with the previous redirect function.
This change will allow these redirects again.
PHPBB3-11997
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/functional/extension_controller_test.php | 4 | ||||
| -rw-r--r-- | tests/security/redirect_test.php | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 5127aa7f47..2476cf0c19 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -132,7 +132,9 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $row_num = str_replace('redirect_expected_', '', $redirect); - $this->assertContains($filesystem->clean_path(self::$root_url) . $crawler->filter('#redirect_expected_' . $row_num)->text(), $crawler->filter('#redirect_' . $row_num)->text()); + $redirect = $crawler->filter('#redirect_' . $row_num)->text(); + $redirect = substr($redirect, 0, strpos($redirect, 'sid') - 1); + $this->assertContains($crawler->filter('#redirect_expected_' . $row_num)->text(), $redirect); } $this->phpbb_extension_manager->purge('foo/bar'); diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php index 48360e3034..24ddaa265d 100644 --- a/tests/security/redirect_test.php +++ b/tests/security/redirect_test.php @@ -38,9 +38,9 @@ class phpbb_security_redirect_test extends phpbb_security_test_base array('./foobar', false, false, 'http://localhost/phpBB/foobar'), array('foo/bar', false, false, 'http://localhost/phpBB/foo/bar'), array('./foo/bar', false, false, 'http://localhost/phpBB/foo/bar'), - array('./../index.php', false, false, 'http://localhost/phpBB/index.php'), + array('./../index.php', false, false, 'http://localhost/index.php'), array('./../index.php', true, false, 'http://localhost/index.php'), - array('../index.php', false, false, 'http://localhost/phpBB/index.php'), + array('../index.php', false, false, 'http://localhost/index.php'), array('../index.php', true, false, 'http://localhost/index.php'), array('./index.php', false, false, 'http://localhost/phpBB/index.php'), ); |
