aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-04-23 22:23:21 +0200
committerAndreas Fischer <bantu@phpbb.com>2015-04-28 22:12:03 +0200
commit416728fc172b03e06b376ca7efb085af27985dbb (patch)
treed72eca610d512b0ca957fbc20b7749f28070e39d /tests/security
parent[ticket/security-180] Merge if statement with previous one in 3.1.x (diff)
parent[ticket/security-180] Add tests for redirecting to main URL (diff)
downloadphpbb-416728fc172b03e06b376ca7efb085af27985dbb.tar.gz
phpbb-416728fc172b03e06b376ca7efb085af27985dbb.tar.bz2
phpbb-416728fc172b03e06b376ca7efb085af27985dbb.zip
Merge branch 'ticket/security-180' into ticket/security-180-asc
Conflicts: tests/security/redirect_test.php
Diffstat (limited to 'tests/security')
-rw-r--r--tests/security/redirect_test.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index 0631365292..a88fc63858 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -23,9 +23,9 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
{
// array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false))
return array(
- array('data://x', false, false, 'http://localhost/phpBB'),
+ array('data://x', false, 'INSECURE_REDIRECT', false),
array('bad://localhost/phpBB/index.php', false, 'INSECURE_REDIRECT', false),
- array('http://www.otherdomain.com/somescript.php', false, false, 'http://localhost/phpBB'),
+ array('http://www.otherdomain.com/somescript.php', false, 'INSECURE_REDIRECT', false),
array("http://localhost/phpBB/memberlist.php\n\rConnection: close", false, 'INSECURE_REDIRECT', false),
array('javascript:test', false, false, 'http://localhost/phpBB/javascript:test'),
array('http://localhost/phpBB/index.php;url=', false, 'INSECURE_REDIRECT', false),
@@ -51,9 +51,11 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
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('https://foobar.com\@http://localhost/phpBB', false, false, 'http://localhost/phpBB'),
+ array('https://foobar.com\@http://localhost/phpBB', false, 'INSECURE_REDIRECT', false),
array('https://foobar.com\@localhost/troll/http://localhost/', false, 'INSECURE_REDIRECT', false),
array('http://localhost.foobar.com\@localhost/troll/http://localhost/', false, 'INSECURE_REDIRECT', false),
+ array('http://localhost/phpBB', false, false, 'http://localhost/phpBB'),
+ array('http://localhost/phpBB/', false, false, 'http://localhost/phpBB/'),
);
}
@@ -108,7 +110,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
if ($expected_error !== false)
{
- $this->setExpectedTriggerError(E_USER_ERROR, $expected_error);
+ $this->setExpectedTriggerError(E_USER_ERROR, $user->lang[$expected_error]);
}
$result = redirect($test, true, $disable_cd_check);