Skip to content

Commit

Permalink
Fix: firewall update.
Browse files Browse the repository at this point in the history
  • Loading branch information
ardavydov committed Apr 6, 2021
1 parent c3652f5 commit ed784ab
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bitrix-antispam
===============

1C Bitrix anti-spam mod. 3.11.13
1C Bitrix anti-spam mod. 3.11.14

Information page,
http://cleantalk.org/bitrix-antispam-module-bez-captcha
Expand Down
2 changes: 1 addition & 1 deletion cleantalk.antispam/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Cleantalk\Common\Firewall\Modules\SFW;

if ( ! defined( 'CLEANTALK_USER_AGENT' ) )
define( 'CLEANTALK_USER_AGENT', 'bitrix-31113' );
define( 'CLEANTALK_USER_AGENT', 'bitrix-31114' );

define('APBCT_TBL_FIREWALL_DATA', 'cleantalk_sfw'); // Table with firewall data.
define('APBCT_TBL_FIREWALL_LOG', 'cleantalk_sfw_logs'); // Table with firewall logs.
Expand Down
4 changes: 2 additions & 2 deletions cleantalk.antispam/install/version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$arModuleVersion = array(
"VERSION" => "3.11.13",
"VERSION_DATE" => "2021-04-05 10:00:00"
"VERSION" => "3.11.14",
"VERSION_DATE" => "2021-04-06 10:00:00"
);
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function update()
if( Get::get('spbc_remote_call_action') == 'sfw_update__write_base' &&
! Get::get('firewall_updating_id') &&
$fw_stats['firewall_updating_id'] &&
time() - $fw_stats['firewall_updating_last_start'] < 60 ){
time() - $fw_stats['firewall_updating_last_start'] < 0 ){
return true;
}

Expand All @@ -107,7 +107,7 @@ public function update()
}

// Set new update ID
if( ! $fw_stats['firewall_updating_id'] || time() - $fw_stats['firewall_updating_last_start'] > 300 ){
if( Get::get('spbc_remote_call_action') == 'sfw_update__write_base' && (! $fw_stats['firewall_updating_id'] || time() - $fw_stats['firewall_updating_last_start'] > 300)) {
$helper::setFwStats(
array(
'firewall_updating_id' => md5( rand( 0, 100000 ) ),
Expand Down

0 comments on commit ed784ab

Please sign in to comment.