Revert "admin: prevent ip spoofing for admin routes"

This reverts commit e3ed4a75b9.

Not the right place to check this header...
This commit is contained in:
Tanguy Pruvot 2017-08-05 02:31:28 +02:00
parent e3ed4a75b9
commit 91fdf629b4

View file

@ -22,7 +22,7 @@ class CommonController extends CController
$this->memcache = new YaampMemcache; $this->memcache = new YaampMemcache;
$this->t1 = microtime(true); $this->t1 = microtime(true);
if(user()->getState('yaamp_admin') && !isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { if(user()->getState('yaamp_admin')) {
$this->admin = true; $this->admin = true;
$client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR'); $client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR');
if (!isAdminIP($client_ip)) { if (!isAdminIP($client_ip)) {