Skip to content

Commit 309c84a

Browse files
committed
Merge branch 'dev' into psc_on_plugins_list.ag
2 parents 1bc5e4c + 9fda77e commit 309c84a

19 files changed

Lines changed: 236 additions & 180 deletions

css/spbc-timeline-widget.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/src/spbc-timeline-widget.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ line.spbc-timelime-highlight-on-tooltip {
4646
.spbc-timeline-svg {
4747
display: block;
4848
width: 100%;
49-
height: 100%;
49+
height: auto;
5050
min-width: 800px;
5151
}
5252

inc/fw-update.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,18 @@ function spbc_security_firewall_update__process_files()
442442
* @return array|bool|int|mixed|string
443443
* @throws Exception
444444
*/
445-
function spbc_security_firewall_update__process_file($path)
445+
function spbc_security_firewall_update__process_file($path, $is_direct_mode = false)
446446
{
447447
global $spbc;
448448

449-
if ( !file_exists($path) ) {
450-
return array('error' => 'PROCESS FILE: file does not exist: ' . $path);
451-
}
449+
if ( !$is_direct_mode ) { // in direct mode we don't need to check if file exists and is readable
450+
if ( !file_exists($path) ) {
451+
return array('error' => 'PROCESS FILE: file does not exist: ' . $path);
452+
}
452453

453-
if ( !is_readable($path) ) {
454-
return array('error' => 'PROCESS FILE: file is not readable: ' . $path);
454+
if ( !is_readable($path) ) {
455+
return array('error' => 'PROCESS FILE: file is not readable: ' . $path);
456+
}
455457
}
456458

457459
$current_file_content = @file_get_contents($path);
@@ -706,7 +708,7 @@ function spbc_security_firewall_update_direct()
706708
// process_file
707709
foreach ( $urls as $url ) {
708710
spbc_security_firewall_update_log('process ' . $url);
709-
$result_process_file = spbc_security_firewall_update__process_file($url);
711+
$result_process_file = spbc_security_firewall_update__process_file($url, true);
710712
if ( ! empty($result_process_file['error']) ) {
711713
return $result_process_file;
712714
}

inc/spbc-auth.php

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

139139
if ( is_wp_error($user) ) {
140-
spbc_authenticate__check_brute_force();
140+
/**
141+
* @todo Migrate BFP disable from constant to settings option
142+
* @psalm-suppress RedundantCondition
143+
*/
144+
if (!SPBC_BFP_DISABLE) {
145+
spbc_authenticate__check_brute_force();
146+
}
141147

142148
$spbc->login_error = true;
143149

inc/spbc-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4944,7 +4944,7 @@ function spbc_settings__get_description()
49444944
),
49454945
'ms__hoster_api_key' => array(
49464946
'title' => __('Hoster access key', 'security-malware-firewall'),
4947-
'desc' => __('You could find it here:<br><a href ="https://cleantalk-screenshots.s3.amazonaws.com/help/hosting-antispam/hapi-ru.png"><img src="https://cleantalk-screenshots.s3.amazonaws.com/help/hosting-antispam/hapi-ru.png"></a><br>Press on the screenshot to zoom.', 'security-malware-firewall')
4947+
'desc' => __('You could find it here:<br><a href ="https://cleantalk-screenshots.s3.amazonaws.com/help/hosting-antispam/hapi-en.png"><img src="https://cleantalk-screenshots.s3.amazonaws.com/help/hosting-antispam/hapi-en.png"></a><br>Press on the screenshot to zoom.', 'security-malware-firewall')
49484948
),
49494949
'listing' => array(
49504950
'title' => __('Directory can be listed from the Internet', 'security-malware-firewall'),

0 commit comments

Comments
 (0)