Skip to content

Commit d5b9215

Browse files
committed
Merge remote-tracking branch 'origin/beta' into beta
2 parents 574441a + 1cb5b45 commit d5b9215

44 files changed

Lines changed: 490 additions & 903 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
"vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility",
2828
"vendor/bin/phpcs --standard=tests/.phpcs.xml",
2929
"vendor/bin/psalm --no-cache --config=psalm.xml"
30-
],
31-
"just_phpunit": [
32-
"vendor/bin/phpunit --configuration tests/phpunit.xml --debug"
33-
],
34-
"just_psalm": [
35-
"vendor/bin/psalm --no-cache --config=psalm.xml --debug"
3630
]
3731
},
3832
"config": {

inc/admin-templates/field-templates/checkbox.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

inc/admin-templates/field-templates/hidden.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

inc/admin-templates/field-templates/number.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

inc/admin-templates/field-templates/radio.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

inc/admin-templates/field-templates/select.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

inc/admin-templates/field-templates/text.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

inc/admin-templates/field-templates/textarea.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

inc/admin-templates/field-templates/time.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

inc/spbc-admin.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ function spbc_admin_init()
145145
add_action('wp_ajax_spbc_settings__check_renew_banner', 'spbc_settings__check_renew_banner');
146146
add_action('wp_ajax_spbc_get_key_auto', 'spbc_get_key_auto');
147147
add_action('wp_ajax_spbc_save_key', 'spbc_save_key');
148-
add_action('wp_ajax_spbc_update_account_email', 'spbc_settings__update_account_email');
149148
add_action('wp_ajax_spbc_create_support_user', 'spbc_settings__spbc_create_support_user');
150149

151150
// Confirm the email to activate 2FA
@@ -228,24 +227,25 @@ function spbct_get_tab_data()
228227
switch ($tab_name) {
229228
case 'critical_updates':
230229
wp_send_json(VulnerabilityAlarmView::getTabCriticalUpdatesData());
231-
break;
230+
// no break
232231
case 'fswatcher':
233232
wp_send_json(\CleantalkSP\SpbctWP\FSWatcher\View\View::getReactData($data));
234-
break;
233+
// no break
235234
case 'traffic_control':
236235
wp_send_json(FirewallView::getReactData($data));
237-
break;
236+
// no break
238237
case 'settings_general':
239238
wp_send_json(SettingsGeneralReact::getReactData());
240-
break;
239+
// no break
241240
case 'security_certified':
242241
PscCertifiedPluginsController::ajaxRenderTab();
243242
break;
244243
case 'spbct_settings_overview':
245244
wp_send_json(spbc_field_options_overview_traffic_light());
246-
break;
245+
// no break
247246
default:
248247
wp_send_json_error('Unknown tab');
248+
// no break
249249
}
250250
}
251251

@@ -298,12 +298,15 @@ function spbc_plugin_list_show_vulnerability($plugin_file, $plugin_data, $_statu
298298
$do_show = (
299299
isset($spbc->settings['vulnerability_check__enable_cron'], $spbc->settings['vulnerability_check__warn_on_modules_pages']) &&
300300
$spbc->settings['vulnerability_check__enable_cron'] == true &&
301-
$spbc->settings['vulnerability_check__warn_on_modules_pages'] == true &&
302-
isset($plugin_data['slug']) // Only plugins which have slug (from wordpress catalog) need to check
301+
$spbc->settings['vulnerability_check__warn_on_modules_pages'] == true
303302
);
304303

305304
if ($do_show) {
306-
$plugin_slug = isset($plugin_data['slug']) ? $plugin_data['slug'] : sanitize_title($plugin_data['Name']);
305+
// WP.org slug is often missing here (custom Plugin URI). Fall back to folder/textdomain.
306+
$plugin_slug = VulnerabilityAlarm::getPluginSlug($plugin_data, $plugin_file);
307+
if ( $plugin_slug === '' ) {
308+
return;
309+
}
307310
$plugin_version = ! empty($plugin_data['Version']) ? $plugin_data['Version'] : '';
308311
$plugin_report = VulnerabilityAlarm::checkPluginVulnerabilityStatic($plugin_slug, $plugin_version);
309312
if ( $plugin_report instanceof \CleantalkSP\SpbctWP\VulnerabilityAlarm\Dto\PluginReport ) {

0 commit comments

Comments
 (0)