From 2a95a5eda485281d320e385ba7938bba0726bd4e Mon Sep 17 00:00:00 2001 From: Florian Brinkmann Date: Fri, 15 Dec 2023 19:51:27 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20don=E2=80=99t=20log=20sensitive=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Handlers/Rules.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Handlers/Rules.php b/src/Handlers/Rules.php index 05de7885..36d94378 100644 --- a/src/Handlers/Rules.php +++ b/src/Handlers/Rules.php @@ -26,7 +26,12 @@ public function apply( $item ) { $score = 0.0; - DebugMode::log( 'Looping through spam rules for reaction with the following data: ' . print_r( $item, true ) ); + $log_item = $item; + unset( $log_item['comment_author_email'] ); + unset( $log_item['comment_author_IP'] ); + unset( $log_item['user_id'] ); + unset( $log_item['user_ID'] ); + DebugMode::log( 'Looping through spam rules for reaction with the following data: ' . print_r( $log_item, true ) ); foreach ( $rules as $rule ) { DebugMode::log( "Checking »{$rule::get_name()}« rule" ); @@ -42,7 +47,7 @@ public function apply( $item ) { } $score += $rule_score; - + DebugMode::log( "Overall score after checking the rule: {$score}" ); }