Skip to content

Commit

Permalink
chore: don’t log sensitive info
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbrinkmann committed Dec 15, 2023
1 parent adb250e commit 2a95a5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Handlers/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand All @@ -42,7 +47,7 @@ public function apply( $item ) {
}

$score += $rule_score;

DebugMode::log( "Overall score after checking the rule: {$score}" );
}

Expand Down

0 comments on commit 2a95a5e

Please sign in to comment.