]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove username/passswords from URLs before writing the to the log file
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 18:19:39 +0000 (20:19 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 18:19:39 +0000 (20:19 +0200)
lib/log.php

index 3f3334801e5e6a9bb6ff9818f41947ab85a175f5..e31e2a893c44b486d4bdf18cc229c8969bbd6fe4 100644 (file)
@@ -36,6 +36,8 @@ class OC_Log {
                                call_user_func(array(self::$class, 'init'));
                        }
                        $log_class=self::$class;
+                       // remove username/passswords from URLs before writing the to the log file
+                       $message = preg_replace('/\/\/(.*):(.*)@/', '//xxx:xxx@', $message);
                        $log_class::write($app, $message, $level);
                }
        }