From 434f372c39885224ccdedb7372300880b2bb5e50 Mon Sep 17 00:00:00 2001 From: Glomberg Date: Wed, 29 Dec 2021 11:10:30 +0300 Subject: [PATCH 01/15] Fix. SFW. Security fix. --- .../lib/Cleantalk/Common/Firewall/Modules/SFW.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleantalk.antispam/lib/Cleantalk/Common/Firewall/Modules/SFW.php b/cleantalk.antispam/lib/Cleantalk/Common/Firewall/Modules/SFW.php index 364a9d3..67f3e34 100644 --- a/cleantalk.antispam/lib/Cleantalk/Common/Firewall/Modules/SFW.php +++ b/cleantalk.antispam/lib/Cleantalk/Common/Firewall/Modules/SFW.php @@ -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 ); } From 523d367b3ecbafb4eb4585538f9cedad819a39c1 Mon Sep 17 00:00:00 2001 From: Glomberg Date: Wed, 29 Dec 2021 11:52:07 +0300 Subject: [PATCH 02/15] Fix. Settings. API key fieldset moved to the top of the section. --- cleantalk.antispam/options.php | 112 ++++++++++++++++----------------- 1 file changed, 55 insertions(+), 57 deletions(-) diff --git a/cleantalk.antispam/options.php b/cleantalk.antispam/options.php index 5aaf2ad..46d6062 100644 --- a/cleantalk.antispam/options.php +++ b/cleantalk.antispam/options.php @@ -169,6 +169,60 @@ function ctDdisableInputLine(ct_input_line){ } } + + + + + '; + print "The anti-spam service is paid by your hosting provider. License #".COption::GetOptionInt( $sModuleId, 'ip_license', 0 )."."; + print ''; + }else{ + $key_is_ok = COption::GetOptionInt( $sModuleId, 'key_is_ok', 0); + ?> +