Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion cleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Cleantalk\ApbctWP\Deactivator;
use Cleantalk\ApbctWP\Firewall\AntiCrawler;
use Cleantalk\ApbctWP\Firewall\AntiFlood;
use Cleantalk\ApbctWP\Firewall\FirewallBypass;
use Cleantalk\ApbctWP\Firewall\SFW;
use Cleantalk\ApbctWP\Firewall\SFWUpdateHelper;
use Cleantalk\ApbctWP\Helper;
Expand Down Expand Up @@ -898,7 +899,7 @@ function apbct_sfw__check()
}
}

// Skip the check
// Skip the check (legacy way, remove in future)
if ( ! empty(Get::get('access')) ) {
$spbc_settings = get_option('spbc_settings');
$spbc_key = ! empty($spbc_settings['spbc_key']) ? $spbc_settings['spbc_key'] : false;
Expand Down Expand Up @@ -938,6 +939,12 @@ function apbct_sfw__check()
return;
}

// Emergency bypass: consume the one-time link from the admin email, then check the granted bypass.
FirewallBypass::maybeSetUserToken();
if (FirewallBypass::bypassByUserToken()) {
return;
}

$firewall = new Firewall(
DB::getInstance()
);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cleantalk/ApbctWP/Escape.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function escUrl($text)
*
* @param $text
*
* @return string|null
* @return string
*/
public static function escUrlRaw($text)
{
Expand Down
Loading
Loading