Skip to content

Commit 578bb77

Browse files
committed
Mod. BFP. Disabling BFP by constant
1 parent 4ceda28 commit 578bb77

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

inc/spbc-auth.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@ function spbc_authenticate($user, $username)
132132
global $spbc;
133133

134134
if ( is_wp_error($user) ) {
135-
spbc_authenticate__check_brute_force();
135+
/**
136+
* @todo Migrate BFP disable from constant to settings option
137+
* @psalm-suppress RedundantCondition
138+
*/
139+
if (!SPBC_BFP_DISABLE) {
140+
spbc_authenticate__check_brute_force();
141+
}
136142

137143
$spbc->login_error = true;
138144

security-malware-firewall.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898
// Auth params
9999
define('SPBC_2FA_KEY_TTL', 600); // 2fa key lifetime in seconds
100100

101+
/**
102+
* @todo Migrate BFP disable from constant to settings option
103+
* Set SPBC_BFP_DISABLE to true to disable Brute Force Protection module
104+
*/
105+
if (!defined('SPBC_BFP_DISABLE')) {
106+
define('SPBC_BFP_DISABLE', false);
107+
}
108+
101109
// DataBase params
102110
global $wpdb;
103111

0 commit comments

Comments
 (0)