aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2009-08-04 10:04:54 +0000
committerJoas Schilling <nickvergessen@gmx.de>2009-08-04 10:04:54 +0000
commitc8daec7c8239fab1cc45eb94829a1a99fd646d46 (patch)
tree7b71254e80db275237555eeed3c9739bbc99987f /phpBB/includes/session.php
parent1f871950d8bbefe59e18c00ea3238591c0b73807 (diff)
downloadforums-c8daec7c8239fab1cc45eb94829a1a99fd646d46.tar
forums-c8daec7c8239fab1cc45eb94829a1a99fd646d46.tar.gz
forums-c8daec7c8239fab1cc45eb94829a1a99fd646d46.tar.bz2
forums-c8daec7c8239fab1cc45eb94829a1a99fd646d46.tar.xz
forums-c8daec7c8239fab1cc45eb94829a1a99fd646d46.zip
Fix Bug #49035 - Fix general error while registration, through undefined variable $config in validate_referer (Patch by wjvriend)
Authorised by: bantu git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9917 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index a49716a8db..b4d817daf9 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1364,6 +1364,8 @@ class session
*/
function validate_referer($check_script_path = false)
{
+ global $config;
+
// no referer - nothing to validate, user's fault for turning it off (we only check on POST; so meta can't be the reason)
if (empty($this->referer) || empty($this->host))
{
@@ -1373,7 +1375,7 @@ class session
$host = htmlspecialchars($this->host);
$ref = substr($this->referer, strpos($this->referer, '://') + 3);
- if (!(stripos($ref, $host) === 0) && (!$config['force_server'] || !(stripos($ref, $config['server_name']) === 0)))
+ if (!(stripos($ref, $host) === 0) && (!$config['force_server_vars'] || !(stripos($ref, $config['server_name']) === 0)))
{
return false;
}