[Pkg-owncloud-commits] [owncloud] 147/239: remove passwords from logfile
David Prévot
taffit at moszumanska.debian.org
Fri Nov 29 01:32:31 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 62afe7fe7af6fae6f5b23172b819fb8298ef291e
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Tue Nov 26 12:26:32 2013 +0100
remove passwords from logfile
---
lib/private/log/owncloud.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php
index 15cace8..4c86d0e 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list