Commit a1f50f61 authored by rjsmelo's avatar rjsmelo

[FIX] Clean the HTTP header for Proxy

parent 38e7e809
......@@ -527,6 +527,7 @@ class TikiLib extends TikiDb_Bridge
'HTTP_CACHE_INFO',
'HTTP_XPROXY',
'HTTP_PROXY',
'HTTP_PROXY_RENAMED',
'HTTP_PROXY_CONNECTION',
'HTTP_VIA',
'HTTP_X_COMING_FROM',
......
......@@ -35,6 +35,14 @@ if (version_compare(PHP_VERSION, '5.6.0', '<')) {
// Be sure that the user is not already defined by PHP on hosts that still have the php.ini config "register_globals = On"
unset($user);
// Ensure that we clean PROXY headers
if (! empty($_SERVER['HTTP_PROXY'])) {
$_SERVER['HTTP_PROXY_RENAMED'] = $_SERVER['HTTP_PROXY'];
unset($_SERVER['HTTP_PROXY']);
putenv('HTTP_PROXY');
putenv('PHP_PEAR_HTTP_PROXY=');
}
require_once 'lib/setup/third_party.php';
// Enable Versioning
include_once('lib/setup/twversion.class.php');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment