Anonymize URL user hash (corrected 2)

This commit is contained in:
bergware
2018-01-08 22:29:23 +01:00
parent 52556d33e7
commit 00f410da7f

View File

@@ -32,7 +32,7 @@ function anonymize($text,$select) {
if (!preg_match("/\b(disk|cache|parity|flash)\d*\b/", $row)) {
$row = preg_replace("/^(\s*\[\S).*(\S\])( => Array)$/","$1..$2$3",$row);
$row = preg_replace("/^(\s*\[(name|nameOrig|comment|flashGUID|regGUID|regTo|readList|writeList|csrf_token)\] => \S).*(\S)$/","$1..$3",$row);
$row = preg_replace("/(host: \"|https?:\/\/).+(\.unraid\.net)/","$1.hash.$2",$row);
$row = preg_replace(["/(host: \").+(\.unraid\.net:\d+\",)/","/(referrer: \"https?:\/\/).+(\.unraid\.net)/"],"$1hash$2",$row);
}
}
return implode("\n", $rows);