Skip to content

Commit

Permalink
Merge pull request #339 from CleanTalk/wpms_tc_fix.ag
Browse files Browse the repository at this point in the history
Fix TC block fro admins
  • Loading branch information
alexandergull authored May 6, 2024
2 parents ca1534f + fc27271 commit 07d445b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion security-malware-firewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ function spbc_enqueue_scripts__public()
function spbc_set_headers()
{
global $spbc;

if ( ! headers_sent() ) {
// Additional headers
if ( $spbc->settings['data__additional_headers'] ) {
Expand All @@ -433,6 +432,14 @@ function spbc_set_headers()
Cookie::get('spbc_is_logged_in') !== md5($spbc->data['salt'] . get_option('home'))
)
) {
// skip rewriting spbc_is_logged_in cookie on favicon request for WPMS - its always run on main site url and returns it`s home url
if (
is_multisite() &&
strpos(Server::get('REQUEST_URI'), 'favicon.ico') !== false
) {
return;
}
//rewrite spbc_is_logged_in cookie
Cookie::set('spbc_is_logged_in', md5($spbc->data['salt'] . get_option('home')), time() + 86400 * 365, '/');
}
}
Expand Down

0 comments on commit 07d445b

Please sign in to comment.