Commit 526b6b43 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Weitere anonymisierungen durchgeführt

parent 7dbe8b1a
......@@ -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)
......
......@@ -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();
......
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