From bba7ccf8d9c0939c1a5057cd98101e5aec5c1a4b Mon Sep 17 00:00:00 2001 From: Dominik Pfennig <dominik@suma-ev.de> Date: Tue, 9 Aug 2016 10:10:28 +0200 Subject: [PATCH] =?UTF-8?q?Weitere=20anonymisierungen=20durchgef=C3=BChrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetaGer.php | 14 +------------- app/Models/Searchengine.php | 8 +------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/app/MetaGer.php b/app/MetaGer.php index c0c04a24a..f347e00cb 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -162,25 +162,13 @@ class MetaGer { $logEntry = ""; $logEntry .= "[" . date(DATE_RFC822, mktime(date("H"),date("i"), date("s"), date("m"), date("d"), date("Y"))) . "]"; - $logEntry .= " From=" . $this->ip; $logEntry .= " pid=" . getmypid(); - $anonId= md5("MySeCrEtSeEdFoRmd5" - .$this->request->header('Accept') - .$this->request->header('Accept-Charset') - .$this->request->header('Accept-Encoding') - .$this->request->header('HTTP_LANGUAGE') - .$this->request->header('User-Agent') - .$this->request->header('Keep-Alive') - .$this->request->header('X-Forwarded-For') - .date("H")); # Wichtig!! Den Parameter um die aktuelle Stunde erweitern. Ansonsten wäre die anonId dauerhaft einem Nutzer zuzuordnen. - $logEntry .= " anonId=$anonId"; $logEntry .= " ref=" . $this->request->header('Referer'); $useragent = $this->request->header('User-Agent'); $useragent = str_replace("(", " ", $useragent); $useragent = str_replace(")", " ", $useragent); $useragent = str_replace(" ", "", $useragent); - $logEntry .= " ua=" . $useragent; - $logEntry .= " iter= mm= time=" . round((microtime(true)-$this->starttime), 2) . " serv=" . $this->fokus . " which= hits= stringSearch= QuickTips= SSS= check="; + $logEntry .= " time=" . round((microtime(true)-$this->starttime), 2) . " serv=" . $this->fokus; $logEntry .= " search=" . $this->eingabe; $redis->rpush('logs.search', $logEntry); }catch( \Exception $e) diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php index bf269b4c1..3cf770a1b 100644 --- a/app/Models/Searchengine.php +++ b/app/Models/Searchengine.php @@ -55,13 +55,7 @@ abstract class Searchengine } # User-Agent definieren: - if( isset($_SERVER['HTTP_USER_AGENT'])) - { - $this->useragent = $_SERVER['HTTP_USER_AGENT']; - }else - { - $this->useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; - } + $this->useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; $this->ip = $metager->getIp(); $this->gefVon = "<a href=\"" . $this->homepage . "\" target=\"_blank\">" . $this->displayName . "</a>"; $this->startTime = microtime(); -- GitLab