Skip to content

Commit

Permalink
Fix. SFW log query fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glomberg committed Feb 11, 2022
1 parent 9a65e04 commit 7b3e853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CleanTalk/lib/CleanTalk/Common/Firewall/Modules/SFW.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ public function update_log( $ip, $status )
all_entries = 1,
blocked_entries = " . ( strpos( $status, 'DENY' ) !== false ? 1 : 0 ) . ",
entries_timestamp = '" . $time . "',
ua_name = '" . Server::get('HTTP_USER_AGENT') . "'
ua_name = '" . addslashes(Server::get('HTTP_USER_AGENT')) . "'
ON DUPLICATE KEY
UPDATE
status = '$status',
all_entries = all_entries + 1,
blocked_entries = blocked_entries" . ( strpos( $status, 'DENY' ) !== false ? ' + 1' : '' ) . ",
entries_timestamp = '" . intval( $time ) . "',
ua_name = '" . Server::get('HTTP_USER_AGENT') . "'";
ua_name = '" . addslashes(Server::get('HTTP_USER_AGENT')) . "'";

$this->db->execute( $query );
}
Expand Down

0 comments on commit 7b3e853

Please sign in to comment.