diff --git a/lib/CleantalkSP/SpbctWP/State.php b/lib/CleantalkSP/SpbctWP/State.php index 5768b108c..be43dc28e 100644 --- a/lib/CleantalkSP/SpbctWP/State.php +++ b/lib/CleantalkSP/SpbctWP/State.php @@ -87,8 +87,8 @@ class State extends \CleantalkSP\Common\State // Frontend scanner 'scanner__frontend_analysis' => 0, 'scanner__frontend_analysis__csrf' => 0, - 'scanner__frontend_analysis__domains_exclusions_view' => "twitter.com\nyoutube.com\nyoutube-nocookie.com\nimg.youtube.com\nmail.ru\nok.ru\nvk.com\nrutube.ru\ndailymotion.com\nyandex.ru\nflikr.com\nfacebook.com\nvimeo.com\nmetacafe.com\nyahoo.com\nmailchimp.com\ngoogletagmanager.com\ngoogle.com\n", - 'scanner__frontend_analysis__domains_exclusions' => "twitter.com\nyoutube.com\nyoutube-nocookie.com\nimg.youtube.com\nmail.ru\nok.ru\nvk.com\nrutube.ru\ndailymotion.com\nyandex.ru\nflikr.com\nfacebook.com\nvimeo.com\nmetacafe.com\nyahoo.com\nmailchimp.com\ngoogletagmanager.com\ngoogle.com\n", + 'scanner__frontend_analysis__domains_exclusions_view' => "twitter.com\nyoutube.com\nyoutube-nocookie.com\nimg.youtube.com\nvk.com\ndailymotion.com\nflikr.com\nfacebook.com\nvimeo.com\nmetacafe.com\nyahoo.com\nmailchimp.com\ngoogletagmanager.com\ngoogle.com\nwidgets.wp.com\n", + 'scanner__frontend_analysis__domains_exclusions' => "twitter.com\nyoutube.com\nyoutube-nocookie.com\nimg.youtube.com\nvk.com\ndailymotion.com\nflikr.com\nfacebook.com\nvimeo.com\nmetacafe.com\nyahoo.com\nmailchimp.com\ngoogletagmanager.com\ngoogle.com\nwidgets.wp.com\n", // Web Application Firewall 'secfw__enabled' => 1, diff --git a/lib/CleantalkSP/Updater/UpdaterScripts.php b/lib/CleantalkSP/Updater/UpdaterScripts.php index c6451d4f9..e7cfb7fb7 100644 --- a/lib/CleantalkSP/Updater/UpdaterScripts.php +++ b/lib/CleantalkSP/Updater/UpdaterScripts.php @@ -1371,4 +1371,36 @@ public static function updateTo_2_141_0() //phpcs:ignore PSR1.Methods.CamelCapsM 'ALTER TABLE ' . SPBC_TBL_SECURITY_LOG . ' MODIFY event VARCHAR(16) NOT NULL;'; DB::getInstance()->execute($sql_change_event_length); } + + public static function updateTo_2_144_1() //phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps + { + global $spbc; + + $new_domains = implode( + "\n", + array( + 'googletagmanager.com', + 'google.com', + 'twitter.com', + 'youtube.com', + 'youtube-nocookie.com', + 'img.youtube.com', + 'dailymotion.com', + 'flikr.com', + 'facebook', + 'vimeo.com', + 'metacafe.com', + 'yahoo.com', + 'mailchimp.com', + 'vk.com', + 'widgets.wp.com' + ) + ); + + // New domain exceptions + $spbc->settings['scanner__frontend_analysis__domains_exclusions'] = $new_domains; + $spbc->settings['scanner__frontend_analysis__domains_exclusions_view'] = $new_domains; + + $spbc->save('settings'); + } }