aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-08-31 20:05:30 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-31 20:05:30 +0200
commitc44bb029c015ab91808b06b8eb691240b7fc575d (patch)
tree10521ba8935917a134730d77bd150ccf00c627df /lib
parent87879e83927d66332d2d0794bc47eeb55f8c9b46 (diff)
Fix log CRLF injection (#7883)
* Fix log CRLF injection * empty -> space Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Log.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Minz/Log.php b/lib/Minz/Log.php
index 8bf193ffe..df3c97904 100644
--- a/lib/Minz/Log.php
+++ b/lib/Minz/Log.php
@@ -56,7 +56,7 @@ class Minz_Log {
$level_label = 'info';
}
- $log = '[' . date('r') . '] [' . $level_label . '] --- ' . $information . "\n";
+ $log = '[' . date('r') . '] [' . $level_label . '] --- ' . str_replace(["\r", "\n"], ' ', $information) . "\n";
if (defined('COPY_LOG_TO_SYSLOG') && COPY_LOG_TO_SYSLOG) {
syslog($level, '[' . $username . '] ' . trim($log));