@@ -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