From 31099a8efda204d764a1d6677a80ff5f710f4575 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 29 Jun 2014 21:02:03 +0200 Subject: [PATCH] [ticket/12787] Use a parameter (_referer) instead of the Referer header PHPBB3-12787 --- phpBB/phpbb/path_helper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index ea45393709..287d5d9e0a 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -192,11 +192,13 @@ class path_helper * app.php/foo/bar memberlist.php ../../ * ../page.php memberlist.php ./phpBB/ * ../sub/page.php memberlist.php ./../phpBB/ + * + * The referer must be specified as a parameter in the query. */ - if ($this->request->is_ajax() && $this->request->header('Referer')) + if ($this->request->is_ajax() && $this->symfony_request->get('_referer')) { $referer_web_root_path = $this->get_web_root_path_from_ajax_referer( - $this->request->header('Referer'), + $this->symfony_request->get('_referer'), $this->symfony_request->getUriForPath('') ); return $this->web_root_path = $this->phpbb_root_path . $referer_web_root_path;