Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4938760
Fix. HeuristicAnalyser. Remove is_callable check
AntonV1211 Sep 24, 2026
d181e03
Fix. FW. Blocking the launch of parallel updates with Direct Upd http…
AntonV1211 Sep 28, 2026
3bb27f5
Version: 2.189.99-dev.
Glomberg Sep 28, 2026
6f71bc0
Version: 2.189.99-dev.
Glomberg Sep 28, 2026
19efc0f
Fix. Scanner. Cloud Analysis. Prevent infinite status polling. https:…
alexandergull Sep 25, 2026
74cfb29
Merge pull request #747 from CleanTalk/fix_heuristic_stage_av
AntonV1211 Sep 29, 2026
81ee26d
Dev. Settings. Analysis tab. Fixed desc.
alexandergull Sep 29, 2026
7531a7c
Dev. Common. Heuristic changes.
alexandergull Sep 29, 2026
c1f86e5
Merge branch 'dev' into fix.cmws_infinite_status_polling.ag
alexandergull Sep 29, 2026
011e1d2
New. Plugins page. Show changelog in the update notice. https://app.d…
alexandergull Sep 25, 2026
96c1a13
Dev. CP. Fixed version gathering and KSES ruleset.
alexandergull Sep 29, 2026
59843b0
Dev. Units.
alexandergull Sep 29, 2026
4cbea03
Merge pull request #753 from CleanTalk/fix.cmws_infinite_status_polli…
alexandergull Sep 30, 2026
b2435b5
Merge pull request #754 from CleanTalk/spbc_changelog_in_notice.ag
alexandergull Sep 30, 2026
600b35f
Upd. Scan. Improve file system analysis. (#744)
svedge Oct 4, 2026
364bf8a
Fix. Code. Added the wp-element dependency
AntonV1211 Oct 5, 2026
c97cd2a
Merge pull request #752 from CleanTalk/fix_lock_direct_upd_av
AntonV1211 Oct 5, 2026
67c46d1
Dev. Code. Common lib updated.
Glomberg Oct 7, 2026
973fb8a
Fix. Scanner. Cure. Fixed stub gluing.
alexandergull Oct 9, 2026
a0eee1a
Upd. Scan. Switch to react scan accordions. (#756)
svedge Oct 9, 2026
c7a0d45
Upd. BFP. Lost password interface protected. (#743)
Glomberg Oct 9, 2026
5522816
Revert "Upd. BFP. Lost password interface protected. (#743)"
svedge Oct 9, 2026
fd96534
Merge dev into beta
svedge Oct 9, 2026
eedcebe
Merge fix into beta
svedge Oct 9, 2026
195ca90
Dev. Code. Update version.
svedge Oct 9, 2026
fe9cc02
chore(changelog): rebuild readme for v2.190 [skip ci]
github-actions[bot] Oct 9, 2026
e13c274
New. Security. Lost-password interface is under rate limit. (#755)
Glomberg Oct 9, 2026
12d6835
Merge dev into beta
svedge Oct 9, 2026
5b90ddf
chore(changelog): rebuild readme for v2.190 [skip ci]
github-actions[bot] Oct 9, 2026
5c734a8
Dev. Code. Improve scan tab.
svedge Oct 13, 2026
d9b7b45
Dev. Code. Improve scan tab.
svedge Oct 13, 2026
890e25f
Dev. Code. Improve scan tab.
svedge Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
== Changelog ==

= 2.190 Oct 09 2026 =
* New. Security. Lost-password interface is under rate limit. (#755)
* Upd. BFP. Lost password interface protected. (#743)
* Upd. Scan. Switch to react scan accordions. (#756)
* Fix. Scanner. Cure. Fixed stub gluing.
* Fix. Code. Added the wp-element dependency
* Upd. Scan. Improve file system analysis. (#744)
* New. Plugins page. Show changelog in the update notice. https://app.doboard.com/1/task/46119
* Fix. Scanner. Cloud Analysis. Prevent infinite status polling. https://app.doboard.com/1/task/55892
* Fix. FW. Blocking the launch of parallel updates with Direct Upd https://app.doboard.com/1/task/58028
* Fix. HeuristicAnalyser. Remove is_callable check

= 2.189 Sep 25 2026 =
* Fix. Code. Re-minify JS.
* Fix. UI. Plugin tabs wrap to fit the screen. (#746)
Expand Down
2 changes: 1 addition & 1 deletion css/spbc-settings.min.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions css/src/spbc-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
left: 0;
top: 0;
text-align: center;
z-index: 1;
pointer-events: none;
}
.spbc_progressbar_counter span{
vertical-align: sub;
Expand Down
63 changes: 62 additions & 1 deletion inc/fw-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ function spbc_security_firewall_update__init($delay = null)

sleep((int)$delay);

// A direct update lives longer than the cron task lock, so it has to be checked before anything is wiped
if ( spbc_security_firewall_update_direct_lock__is_active() ) {
return true;
}

$spbc->update_logger::clearStorage();
$spbc->update_logger->writeLog('UPDATE INIT START');

Expand Down Expand Up @@ -584,7 +589,8 @@ static function ($hash) {
SPBC_TBL_FIREWALL_DATA . '_temp', // Write to the main table for daughter blogs
SPBC_TBL_FIREWALL_DATA__IPS . '_temp',
SPBC_TBL_FIREWALL_DATA__COUNTRIES . '_temp',
$path
$path,
$current_file_content
);

$single_file_result = empty($result['error'])
Expand Down Expand Up @@ -844,13 +850,67 @@ function spbc_security_firewall_update__checker()
return true;
}

/**
* Heartbeat option name of a running direct Security FireWall update.
*/
if ( ! defined('SPBC_SECFW_DIRECT_UPDATE_LOCK_OPTION') ) {
define('SPBC_SECFW_DIRECT_UPDATE_LOCK_OPTION', 'spbc_secfw_direct_update_lock');
}

/**
* Seconds without a heartbeat after which a direct update is considered dead.
*/
if ( ! defined('SPBC_SECFW_DIRECT_UPDATE_LOCK_TTL') ) {
define('SPBC_SECFW_DIRECT_UPDATE_LOCK_TTL', 120);
}

/**
* @return bool
*/
function spbc_security_firewall_update_direct_lock__is_active()
{
$heartbeat = (int)get_option(SPBC_SECFW_DIRECT_UPDATE_LOCK_OPTION, 0);

return $heartbeat > 0 && time() - $heartbeat < SPBC_SECFW_DIRECT_UPDATE_LOCK_TTL;
}

function spbc_security_firewall_update_direct_lock__touch()
{
update_option(SPBC_SECFW_DIRECT_UPDATE_LOCK_OPTION, time(), false);
}

function spbc_security_firewall_update_direct_lock__release()
{
update_option(SPBC_SECFW_DIRECT_UPDATE_LOCK_OPTION, 0, false);
}

/**
* Update security firewall in single thread
*
* @return bool|string[]|array[]
* @throws Exception
*/
function spbc_security_firewall_update_direct()
{
spbc_security_firewall_update_direct_lock__touch();

try {
$result = spbc_security_firewall_update_direct__run();
} catch ( Exception $e ) {
spbc_security_firewall_update_direct_lock__release();
throw $e;
}

spbc_security_firewall_update_direct_lock__release();

return $result;
}

/**
* @return bool|string[]|array[]
* @throws Exception
*/
function spbc_security_firewall_update_direct__run()
{
global $spbc;

Expand All @@ -873,6 +933,7 @@ function spbc_security_firewall_update_direct()

// process_file
foreach ( $urls as $url ) {
spbc_security_firewall_update_direct_lock__touch();
$result_process_file = spbc_security_firewall_update__process_file($url, true);
if ( ! empty($result_process_file['error']) ) {
$spbc->update_logger->writeLog('DIRECT UPDATE ERROR: processing file: ' . @json_encode($result_process_file['error']));
Expand Down
13 changes: 10 additions & 3 deletions inc/spbc-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use CleantalkSP\SpbctWP\UsersPassCheckModule\UsersPassCheckHandler;
use CleantalkSP\SpbctWP\Scanner\ScannerAjaxEndpoints;
use CleantalkSP\SpbctWP\Scanner\ScannerActions\BackupsActions;
use CleantalkSP\SpbctWP\UpdateChangelogNotice;

// Prevent direct call
if ( ! defined('ABSPATH') ) {
Expand Down Expand Up @@ -98,6 +99,8 @@ function spbc_admin_init()
add_action('wp_ajax_spbc_scanner__pause', 'spbc_scanner__pause');
add_action('wp_ajax_spbc_scanner__resume', 'spbc_scanner__resume');
add_action('wp_ajax_spbc_scanner__getScannerStatus', 'spbc_scanner__getScannerStatus');
add_action('wp_ajax_spbc_scanner__ackRuntimeError', 'spbc_scanner__ackRuntimeError');
add_action('wp_ajax_spbc_scanner__debug_log', 'spbc_scanner__debug_log');
add_action('wp_ajax_spbc_scanner__last_scan_info', array(ScannerAjaxEndpoints::class, 'getLastScanInfo'));

// Scanner buttons
Expand All @@ -115,6 +118,7 @@ function spbc_admin_init()
// Settings
add_action('wp_ajax_spbc_settings__draw_elements', 'spbc_settings__draw_elements');
add_action('wp_ajax_spbc_scanner_tab__reload_accordion', 'spbc_field_scanner__show_accordion');
add_action('wp_ajax_spbc_scanner__get_accordions', 'spbc_scanner__get_accordions');

// Tabs requests handlers (React)
add_action('wp_ajax_spbct_get_tab_data', 'spbct_get_tab_data');
Expand Down Expand Up @@ -300,6 +304,8 @@ function spbc_plugin_action_links($links)
return $links;
}

UpdateChangelogNotice::register();

add_action('after_plugin_row', 'spbc_plugin_list_show_vulnerability', 20, 3);
function spbc_plugin_list_show_vulnerability($plugin_file, $plugin_data, $_status)
{
Expand Down Expand Up @@ -762,10 +768,11 @@ function spbc_get_secure_cookies()
{
$secure_cookies = array();

if (Cookie::getString('spbc_cookies_test')) {
$cookie_test = Cookie::getString('spbc_cookies_test');
if (Cookie::get('spbc_cookies_test')) {
// Cookie::get() JSON-decodes the value, so getString() would return ''.
$cookie_test = Cookie::getArray('spbc_cookies_test');

if (!is_array($cookie_test)) {
if (empty($cookie_test['cookies_names']) || !is_array($cookie_test['cookies_names']) || !isset($cookie_test['check_value'])) {
throw new Exception('SPBC: Secure cookies does not get (there are not cookies).');
}

Expand Down
27 changes: 26 additions & 1 deletion inc/spbc-auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
die('Not allowed!');
}

add_filter('authenticate', 'spbc_authenticate', 20, 2); // Hooks for authentificate
add_filter('authenticate', 'spbc_authenticate', 20, 2); // Hooks for authenticate
add_action('lostpassword_post', 'spbc_lostpassword_rate_limit', 20, 2); // Hooks for lost password request checking

// Hook for token-based logins (plugins like "Temporary Login Without Password")
add_action('set_logged_in_cookie', 'spbc_detect_token_login', 10, 6);
Expand Down Expand Up @@ -266,6 +267,30 @@ function spbc_authenticate($user, $username)
return $user;
}

function spbc_lostpassword_rate_limit($error)
{
global $spbc;
$limit = !empty($spbc->settings['bfp__allowed_wrong_auths'])
? (int) $spbc->settings['bfp__allowed_wrong_auths']
: 5;
$period = !empty($spbc->settings['bfp__block_period__5_fails'])
? (int) $spbc->settings['bfp__block_period__5_fails']
: 3600;
$config = new RateLimiterConfig('lostpassword_rate_limit', $limit, $period);
$rate_limiter = new SpbcRateLimiter($config);
$rate_limiter_check = $rate_limiter->checkPassed();
if ( ! $rate_limiter_check ) {
$limit_message = esc_html__('Current route access denied. (Security by CleanTalk)', 'security-malware-firewall');
add_filter('lostpassword_errors', function ($_errors, $_user) use ($limit_message) {
return new WP_Error(403, $limit_message);
}, 20, 2);
if (function_exists('wc_add_notice')) {
wp_die($limit_message, '', ['response' => 403]);
}
}
return $error;
}

/**
* Detecting new device
*
Expand Down
Loading
Loading