diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-26 15:26:32 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-26 15:26:32 +0400 |
commit | 62afe7fe7af6fae6f5b23172b819fb8298ef291e (patch) | |
tree | 7f828350030c1e8738efea2f3ad3f911af9ae2a5 /lib | |
parent | dc67c7efa9ff20f8b4466e5b6490405439d4a90f (diff) |
remove passwords from logfile
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/log/owncloud.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php index 15cace88f41..4c86d0e45e0 100644 --- a/lib/private/log/owncloud.php +++ b/lib/private/log/owncloud.php @@ -68,6 +68,8 @@ class OC_Log_Owncloud { $timezone = new DateTimeZone('UTC'); } $time = new DateTime(null, $timezone); + // remove username/passswords from URLs before writing the to the log file + $message = preg_replace('/\/\/(.*):(.*)@/', '//xxx:xxx@', $message); $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time->format($format)); $entry = json_encode($entry); $handle = @fopen(self::$logFile, 'a'); |