mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
all 557 tests pass now :D
git-svn-id: file:///svn/phpbb/trunk@9091 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
99fa62267e
commit
d26f38c4e0
2 changed files with 14 additions and 1 deletions
|
@ -19,6 +19,14 @@ define('PHP_EXT', 'php');
|
||||||
require_once '../phpBB/includes/functions.php';
|
require_once '../phpBB/includes/functions.php';
|
||||||
require_once '../phpBB/includes/session.php';
|
require_once '../phpBB/includes/session.php';
|
||||||
|
|
||||||
|
if (!isset($config))
|
||||||
|
{
|
||||||
|
$config = array();
|
||||||
|
}
|
||||||
|
$config += array(
|
||||||
|
'force_server_vars' => 0,
|
||||||
|
);
|
||||||
|
|
||||||
class phpbb_security_redirect_test extends PHPUnit_Extensions_OutputTestCase
|
class phpbb_security_redirect_test extends PHPUnit_Extensions_OutputTestCase
|
||||||
{
|
{
|
||||||
protected $error_triggered = false;
|
protected $error_triggered = false;
|
||||||
|
@ -28,6 +36,7 @@ class phpbb_security_redirect_test extends PHPUnit_Extensions_OutputTestCase
|
||||||
// array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false))
|
// array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false))
|
||||||
return array(
|
return array(
|
||||||
array('data://x', false, 'http://localhost/phpBB'),
|
array('data://x', false, 'http://localhost/phpBB'),
|
||||||
|
array('bad://localhost/phpBB/index.php', 'Tried to redirect to potentially insecure url.', false),
|
||||||
array('http://www.otherdomain.com/somescript.php', false, 'http://localhost/phpBB'),
|
array('http://www.otherdomain.com/somescript.php', false, 'http://localhost/phpBB'),
|
||||||
array("http://localhost/phpBB/memberlist.php\n\rConnection: close", 'Tried to redirect to potentially insecure url.', false),
|
array("http://localhost/phpBB/memberlist.php\n\rConnection: close", 'Tried to redirect to potentially insecure url.', false),
|
||||||
array('javascript:test', false, 'http://localhost/phpBB/../tests/javascript:test'),
|
array('javascript:test', false, 'http://localhost/phpBB/../tests/javascript:test'),
|
||||||
|
|
|
@ -18,7 +18,11 @@ require_once '../phpBB/includes/constants.php';
|
||||||
require_once '../phpBB/includes/functions.php';
|
require_once '../phpBB/includes/functions.php';
|
||||||
require_once '../phpBB/includes/template.php';
|
require_once '../phpBB/includes/template.php';
|
||||||
|
|
||||||
$config = array(
|
if (!isset($config))
|
||||||
|
{
|
||||||
|
$config = array();
|
||||||
|
}
|
||||||
|
$config += array(
|
||||||
'load_tplcompile' => true
|
'load_tplcompile' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue