|
|
@@ -17,7 +17,8 @@ class serverLog {
|
|
|
}
|
|
|
|
|
|
public static function filtreLog(string $_log){
|
|
|
- self::printLog($_log);
|
|
|
+ $log = self::hidePassword($_log);
|
|
|
+ self::printLog($log);
|
|
|
}
|
|
|
|
|
|
private static function ifFolderWww(string $_log){
|
|
|
@@ -32,4 +33,9 @@ class serverLog {
|
|
|
return (stripos($_log, "/var/www/") == FALSE AND stripos($_log, "https://") == FALSE) ? TRUE : FALSE;
|
|
|
}
|
|
|
|
|
|
+ private static function hidePassword($input) {
|
|
|
+ return preg_replace("/('password'\s*=>\s*)'[^']*'/", "$1'####'", $input);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|