Shield Security for WordPress - Version 10.0.3

Version Description

Download this release

Release Info

Developer paultgoodchild
Plugin Icon 128x128 Shield Security for WordPress
Version 10.0.3
Comparing to
See all releases

Code changes from version 10.0.2 to 10.0.3

cl.json CHANGED
@@ -59,6 +59,14 @@
59
  "Added support for detection of Huawei search engine bot/spider."
60
  ]
61
  },
 
 
 
 
 
 
 
 
62
  {
63
  "type": "improved",
64
  "title": "PHP 7+ Only",
@@ -122,6 +130,12 @@
122
  "title": "Fatal error when IP address isn't detected",
123
  "description": [],
124
  "patch": "10.0.2"
 
 
 
 
 
 
125
  }
126
  ]
127
  },
59
  "Added support for detection of Huawei search engine bot/spider."
60
  ]
61
  },
62
+ {
63
+ "type": "new",
64
+ "title": "Shield plugin badge URL may be replaced using White Label settings",
65
+ "description": [
66
+ "The URL used in the Shield plugin badge may be replaced using the Home URL provided in White Label settings."
67
+ ],
68
+ "patch": "10.0.3"
69
+ },
70
  {
71
  "type": "improved",
72
  "title": "PHP 7+ Only",
130
  "title": "Fatal error when IP address isn't detected",
131
  "description": [],
132
  "patch": "10.0.2"
133
+ },
134
+ {
135
+ "type": "fixed",
136
+ "title": "Not correctly identifying GoogleBot.",
137
+ "description": [],
138
+ "patch": "10.0.3"
139
  }
140
  ]
141
  },
icwp-wpsf.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
- * Version: 10.0.2
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
+ * Version: 10.0.3
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
plugin-spec.php CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "10.0.2",
4
- "release_timestamp": 1603297441,
5
- "build": "202010.2103",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield",
1
  {
2
  "properties": {
3
+ "version": "10.0.3",
4
+ "release_timestamp": 1603551407,
5
+ "build": "202010.2401",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield",
readme.txt CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.5.2
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.5
11
- Stable tag: 10.0.2
12
 
13
  The highest rated WordPress Security plugin, delivering unparalleled, all-in-one protection for you and your customers.
14
 
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.5
11
+ Stable tag: 10.0.3
12
 
13
  The highest rated WordPress Security plugin, delivering unparalleled, all-in-one protection for you and your customers.
14
 
src/config/feature-admin_access_restriction.php CHANGED
@@ -269,6 +269,17 @@
269
  "summary": "Hide Available Updates From Non Security Admins",
270
  "description": "Hides the availability of Shield updates from non-security admins."
271
  },
 
 
 
 
 
 
 
 
 
 
 
272
  {
273
  "key": "wl_pluginnamemain",
274
  "section": "section_whitelabel",
269
  "summary": "Hide Available Updates From Non Security Admins",
270
  "description": "Hides the availability of Shield updates from non-security admins."
271
  },
272
+ {
273
+ "key": "wl_replace_badge_url",
274
+ "section": "section_whitelabel",
275
+ "default": "N",
276
+ "type": "checkbox",
277
+ "link_info": "",
278
+ "link_blog": "",
279
+ "name": "Replace Badge URL",
280
+ "summary": "Replace Plugin Badge URL",
281
+ "description": "When using the plugin badge, replace the link with your Whitelabel Home URL."
282
+ },
283
  {
284
  "key": "wl_pluginnamemain",
285
  "section": "section_whitelabel",
src/config/feature-user_management.php CHANGED
@@ -1,6 +1,7 @@
1
  {
2
  "slug": "user_management",
3
  "properties": {
 
4
  "name": "User Management",
5
  "sidebar_name": "Users",
6
  "show_module_menu_item": false,
@@ -197,7 +198,10 @@
197
  "key": "email_checks",
198
  "section": "section_user_reg",
199
  "type": "multiple_select",
200
- "default": [ "syntax", "domain" ],
 
 
 
201
  "value_options": [
202
  {
203
  "value_key": "syntax",
1
  {
2
  "slug": "user_management",
3
  "properties": {
4
+ "slug": "user_management",
5
  "name": "User Management",
6
  "sidebar_name": "Users",
7
  "show_module_menu_item": false,
198
  "key": "email_checks",
199
  "section": "section_user_reg",
200
  "type": "multiple_select",
201
+ "default": [
202
+ "syntax",
203
+ "domain"
204
+ ],
205
  "value_options": [
206
  {
207
  "value_key": "syntax",
src/features/admin_access_restriction.php CHANGED
@@ -13,11 +13,24 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
13
  */
14
  private $bValidSecAdminRequest;
15
 
 
 
 
 
 
16
  protected function setupCustomHooks() {
17
  parent::setupCustomHooks();
18
  add_action( $this->prefix( 'pre_deactivate_plugin' ), [ $this, 'preDeactivatePlugin' ] );
19
  }
20
 
 
 
 
 
 
 
 
 
21
  /**
22
  * @return bool
23
  * @throws \Exception
13
  */
14
  private $bValidSecAdminRequest;
15
 
16
+ /**
17
+ * @var SecurityAdmin\Lib\WhiteLabel\ApplyLabels
18
+ */
19
+ private $oWhiteLabelController;
20
+
21
  protected function setupCustomHooks() {
22
  parent::setupCustomHooks();
23
  add_action( $this->prefix( 'pre_deactivate_plugin' ), [ $this, 'preDeactivatePlugin' ] );
24
  }
25
 
26
+ public function getWhiteLabelController() :SecurityAdmin\Lib\WhiteLabel\ApplyLabels {
27
+ if ( !$this->oWhiteLabelController instanceof SecurityAdmin\Lib\WhiteLabel\ApplyLabels ) {
28
+ $this->oWhiteLabelController = ( new SecurityAdmin\Lib\WhiteLabel\ApplyLabels() )
29
+ ->setMod( $this );
30
+ }
31
+ return $this->oWhiteLabelController;
32
+ }
33
+
34
  /**
35
  * @return bool
36
  * @throws \Exception
src/lib/src/Modules/Base/Options.php CHANGED
@@ -96,7 +96,7 @@ class Options {
96
  }
97
 
98
  public function getSlug() :string {
99
- return $this->getFeatureProperty( 'slug' );
100
  }
101
 
102
  /**
96
  }
97
 
98
  public function getSlug() :string {
99
+ return (string)$this->getFeatureProperty( 'slug' );
100
  }
101
 
102
  /**
src/lib/src/Modules/Plugin/Components/PluginBadge.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin\Components;
4
 
5
- use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin\Options;
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
@@ -12,7 +12,7 @@ use FernleafSystems\Wordpress\Services\Services;
12
  */
13
  class PluginBadge {
14
 
15
- use ModConsumer;
16
 
17
  public function run() {
18
  /** @var Options $opts */
@@ -65,15 +65,21 @@ class PluginBadge {
65
  * @return string
66
  */
67
  public function render( $bFloating = false ) {
68
- $oCon = $this->getCon();
69
- $sName = $oCon->getHumanName();
70
-
71
- $sBadgeUrl = 'https://shsec.io/wpsecurityfirewall';
72
- $oLicense = $oCon->getModule_License()
73
- ->getLicenseHandler()
74
- ->getLicense();
75
- if ( !empty( $oLicense->aff_ref ) ) {
76
- $sBadgeUrl = add_query_arg( [ 'ref' => $oLicense->aff_ref ], $sBadgeUrl );
 
 
 
 
 
 
77
  }
78
 
79
  $aData = [
@@ -85,8 +91,8 @@ class PluginBadge {
85
  'is_floating' => $bFloating
86
  ],
87
  'hrefs' => [
88
- 'badge' => $sBadgeUrl,
89
- 'logo' => $oCon->getPluginUrl_Image( 'shield/shield-security-logo-colour-32px.png' ),
90
  ],
91
  'strings' => [
92
  'protected' => apply_filters( 'icwp_shield_plugin_badge_text',
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin\Components;
4
 
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin\Options;
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
12
  */
13
  class PluginBadge {
14
 
15
+ use Modules\ModConsumer;
16
 
17
  public function run() {
18
  /** @var Options $opts */
65
  * @return string
66
  */
67
  public function render( $bFloating = false ) {
68
+ $con = $this->getCon();
69
+ $sName = $con->getHumanName();
70
+
71
+ $badgeUrl = 'https://shsec.io/wpsecurityfirewall';
72
+ /** @var Modules\SecurityAdmin\Options $secAdminOpts */
73
+ $secAdminOpts = $con->getModule_SecAdmin()->getOptions();
74
+ if ( $secAdminOpts->isEnabledWhitelabel() && $secAdminOpts->isReplaceBadgeUrl() ) {
75
+ $badgeUrl = $secAdminOpts->getOpt( 'wl_homeurl' );
76
+ }
77
+
78
+ $lic = $con->getModule_License()
79
+ ->getLicenseHandler()
80
+ ->getLicense();
81
+ if ( !empty( $lic->aff_ref ) ) {
82
+ $badgeUrl = add_query_arg( [ 'ref' => $lic->aff_ref ], $badgeUrl );
83
  }
84
 
85
  $aData = [
91
  'is_floating' => $bFloating
92
  ],
93
  'hrefs' => [
94
+ 'badge' => $badgeUrl,
95
+ 'logo' => $con->getPluginUrl_Image( 'shield/shield-security-logo-colour-32px.png' ),
96
  ],
97
  'strings' => [
98
  'protected' => apply_filters( 'icwp_shield_plugin_badge_text',
src/lib/src/Modules/SecurityAdmin/Lib/WhiteLabel/ApplyLabels.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin\Lib\WhiteLabel;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin;
7
  use FernleafSystems\Wordpress\Services\Services;
@@ -9,20 +10,27 @@ use FernleafSystems\Wordpress\Services\Services;
9
  class ApplyLabels {
10
 
11
  use ModConsumer;
 
12
 
13
- public function run() {
14
- $oCon = $this->getCon();
 
 
 
 
 
 
15
  add_action( 'init', [ $this, 'onWpInit' ] );
16
- add_filter( $oCon->prefix( 'is_relabelled' ), '__return_true' );
17
- add_filter( $oCon->prefix( 'plugin_labels' ), [ $this, 'applyPluginLabels' ] );
18
  add_filter( 'plugin_row_meta', [ $this, 'removePluginMetaLinks' ], 200, 2 );
19
  add_action( 'admin_print_footer_scripts-plugin-editor.php', [ $this, 'hideFromPluginEditor' ] );
20
  }
21
 
22
  public function onWpInit() {
23
- /** @var SecurityAdmin\Options $oOpts */
24
- $oOpts = $this->getOptions();
25
- if ( $oOpts->isWlHideUpdates() && $this->isNeedToHideUpdates() && !$this->getCon()->isPluginAdmin() ) {
26
  $this->hideUpdates();
27
  }
28
  }
@@ -57,52 +65,48 @@ class ApplyLabels {
57
  }
58
 
59
  public function hideFromPluginEditor() {
60
- $oCon = $this->getCon();
61
- $sJs = Services::Data()->readFileContentsUsingInclude( $oCon->getPath_AssetJs( 'whitelabel.js' ) );
62
- echo sprintf( '<script type="text/javascript">%s</script>', sprintf( $sJs, $oCon->getPluginBaseFile() ) );
63
  }
64
 
65
  /**
66
- * @param array $aPluginLabels
67
  * @return array
68
  */
69
- public function applyPluginLabels( $aPluginLabels ) {
70
- /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
71
- $oMod = $this->getMod();
72
 
73
- $aWhiteLabels = $oMod->getWhitelabelOptions();
74
 
75
  // these are the old white labelling keys which will be replaced upon final release of white labelling.
76
- $sServiceName = $aWhiteLabels[ 'name_main' ];
77
- $aPluginLabels[ 'Name' ] = $sServiceName;
78
- $aPluginLabels[ 'Title' ] = $sServiceName;
79
- $aPluginLabels[ 'Author' ] = $aWhiteLabels[ 'name_company' ];
80
- $aPluginLabels[ 'AuthorName' ] = $aWhiteLabels[ 'name_company' ];
81
- $aPluginLabels[ 'MenuTitle' ] = $aWhiteLabels[ 'name_menu' ];
82
-
83
- $sTagLine = $aWhiteLabels[ 'description' ];
84
- if ( !empty( $sTagLine ) ) {
85
- $aPluginLabels[ 'Description' ] = $sTagLine;
86
  }
87
 
88
- $sUrl = $aWhiteLabels[ 'url_home' ];
89
- if ( !empty( $sUrl ) ) {
90
- $aPluginLabels[ 'PluginURI' ] = $sUrl;
91
- $aPluginLabels[ 'AuthorURI' ] = $sUrl;
92
  }
93
 
94
- $sIconUrl = $aWhiteLabels[ 'url_icon' ];
95
- if ( !empty( $sIconUrl ) ) {
96
- $aPluginLabels[ 'icon_url_16x16' ] = $sIconUrl;
97
- $aPluginLabels[ 'icon_url_32x32' ] = $sIconUrl;
98
  }
99
 
100
- $sLogoUrl = $aWhiteLabels[ 'url_dashboardlogourl' ];
101
- if ( !empty( $sLogoUrl ) ) {
102
- $aPluginLabels[ 'icon_url_128x128' ] = $sLogoUrl;
103
  }
104
 
105
- return array_merge( $aWhiteLabels, $aPluginLabels );
106
  }
107
 
108
  /**
@@ -132,10 +136,7 @@ class ApplyLabels {
132
  return $oPlugins;
133
  }
134
 
135
- /**
136
- * @return bool
137
- */
138
- private function isNeedToHideUpdates() {
139
  return is_admin() && !Services::WpGeneral()->isCron();
140
  }
141
  }
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin\Lib\WhiteLabel;
4
 
5
+ use FernleafSystems\Utilities\Logic\OneTimeExecute;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
7
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin;
8
  use FernleafSystems\Wordpress\Services\Services;
10
  class ApplyLabels {
11
 
12
  use ModConsumer;
13
+ use OneTimeExecute;
14
 
15
+ protected function canRun() {
16
+ /** @var SecurityAdmin\Options $opts */
17
+ $opts = $this->getOptions();
18
+ return $opts->isEnabledWhitelabel();
19
+ }
20
+
21
+ protected function run() {
22
+ $con = $this->getCon();
23
  add_action( 'init', [ $this, 'onWpInit' ] );
24
+ add_filter( $con->prefix( 'is_relabelled' ), '__return_true' );
25
+ add_filter( $con->prefix( 'plugin_labels' ), [ $this, 'applyPluginLabels' ] );
26
  add_filter( 'plugin_row_meta', [ $this, 'removePluginMetaLinks' ], 200, 2 );
27
  add_action( 'admin_print_footer_scripts-plugin-editor.php', [ $this, 'hideFromPluginEditor' ] );
28
  }
29
 
30
  public function onWpInit() {
31
+ /** @var SecurityAdmin\Options $opts */
32
+ $opts = $this->getOptions();
33
+ if ( $opts->isWlHideUpdates() && $this->isNeedToHideUpdates() && !$this->getCon()->isPluginAdmin() ) {
34
  $this->hideUpdates();
35
  }
36
  }
65
  }
66
 
67
  public function hideFromPluginEditor() {
68
+ $con = $this->getCon();
69
+ $sJs = Services::Data()->readFileContentsUsingInclude( $con->getPath_AssetJs( 'whitelabel.js' ) );
70
+ echo sprintf( '<script type="text/javascript">%s</script>', sprintf( $sJs, $con->getPluginBaseFile() ) );
71
  }
72
 
73
  /**
74
+ * @param array $pluginLabels
75
  * @return array
76
  */
77
+ public function applyPluginLabels( $pluginLabels ) {
78
+ /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
79
+ $mod = $this->getMod();
80
 
81
+ $labels = $mod->getWhitelabelOptions();
82
 
83
  // these are the old white labelling keys which will be replaced upon final release of white labelling.
84
+ $sServiceName = $labels[ 'name_main' ];
85
+ $pluginLabels[ 'Name' ] = $sServiceName;
86
+ $pluginLabels[ 'Title' ] = $sServiceName;
87
+ $pluginLabels[ 'Author' ] = $labels[ 'name_company' ];
88
+ $pluginLabels[ 'AuthorName' ] = $labels[ 'name_company' ];
89
+ $pluginLabels[ 'MenuTitle' ] = $labels[ 'name_menu' ];
90
+
91
+ if ( !empty( $labels[ 'description' ] ) ) {
92
+ $pluginLabels[ 'Description' ] = $labels[ 'description' ];
 
93
  }
94
 
95
+ if ( !empty( $labels[ 'url_home' ] ) ) {
96
+ $pluginLabels[ 'PluginURI' ] = $labels[ 'url_home' ];
97
+ $pluginLabels[ 'AuthorURI' ] = $labels[ 'url_home' ];
 
98
  }
99
 
100
+ if ( !empty( $labels[ 'url_icon' ] ) ) {
101
+ $pluginLabels[ 'icon_url_16x16' ] = $labels[ 'url_icon' ];
102
+ $pluginLabels[ 'icon_url_32x32' ] = $labels[ 'url_icon' ];
 
103
  }
104
 
105
+ if ( !empty( $labels[ 'url_dashboardlogourl' ] ) ) {
106
+ $pluginLabels[ 'icon_url_128x128' ] = $labels[ 'url_dashboardlogourl' ];
 
107
  }
108
 
109
+ return array_merge( $labels, $pluginLabels );
110
  }
111
 
112
  /**
136
  return $oPlugins;
137
  }
138
 
139
+ private function isNeedToHideUpdates() :bool {
 
 
 
140
  return is_admin() && !Services::WpGeneral()->isCron();
141
  }
142
  }
src/lib/src/Modules/SecurityAdmin/Options.php CHANGED
@@ -90,4 +90,8 @@ class Options extends Base\ShieldOptions {
90
  public function isWlHideUpdates() :bool {
91
  return $this->isEnabledWhitelabel() && $this->isOpt( 'wl_hide_updates', 'Y' );
92
  }
 
 
 
 
93
  }
90
  public function isWlHideUpdates() :bool {
91
  return $this->isEnabledWhitelabel() && $this->isOpt( 'wl_hide_updates', 'Y' );
92
  }
93
+
94
+ public function isReplaceBadgeUrl() :bool {
95
+ return $this->isOpt( 'wl_replace_badge_url', 'Y' );
96
+ }
97
  }
src/lib/vendor/composer/autoload_classmap.php CHANGED
@@ -156,6 +156,18 @@ return array(
156
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Insert' => $baseDir . '/src/Databases/Traffic/Insert.php',
157
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Select' => $baseDir . '/src/Databases/Traffic/Select.php',
158
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Helpers\\QuickAccess' => $baseDir . '/src/Helpers/QuickAccess.php',
 
 
 
 
 
 
 
 
 
 
 
 
159
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\License\\EddLicenseVO' => $baseDir . '/src/License/EddLicenseVO.php',
160
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\AjaxHandler' => $baseDir . '/src/Modules/AuditTrail/AjaxHandler.php',
161
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\Auditors\\Base' => $baseDir . '/src/Modules/AuditTrail/Auditors/Base.php',
@@ -188,7 +200,6 @@ return array(
188
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\BaseReporting' => $baseDir . '/src/Modules/Base/BaseReporting.php',
189
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Debug' => $baseDir . '/src/Modules/Base/Debug.php',
190
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Insights\\OverviewCards' => $baseDir . '/src/Modules/Base/Insights/OverviewCards.php',
191
- 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\OneTimeExecute' => $baseDir . '/src/Modules/Base/OneTimeExecute.php',
192
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => $baseDir . '/src/Modules/Base/Options.php',
193
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options\\OptValueSanitize' => $baseDir . '/src/Modules/Base/Options/OptValueSanitize.php',
194
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => $baseDir . '/src/Modules/Base/ShieldOptions.php',
@@ -250,6 +261,7 @@ return array(
250
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Restore' => $baseDir . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Restore.php',
251
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Verify' => $baseDir . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Verify.php',
252
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\FileLockerAlerts' => $baseDir . '/src/Modules/HackGuard/Lib/Reports/FileLockerAlerts.php',
 
253
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\ScanAlerts' => $baseDir . '/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php',
254
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesForAsset' => $baseDir . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesForAsset.php',
255
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesFromApi' => $baseDir . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesFromApi.php',
@@ -850,7 +862,6 @@ return array(
850
  'ICWP_WPSF_Processor_UserManagement' => $baseDir . '/../processors/user_management.php',
851
  'ICWP_WPSF_Processor_UserManagement_Passwords' => $baseDir . '/../processors/usermanagement_passwords.php',
852
  'ICWP_WPSF_Processor_UserManagement_Sessions' => $baseDir . '/../processors/usermanagement_sessions.php',
853
- 'ICWP_WPSF_Processor_UserManagement_Suspend' => $baseDir . '/../processors/usermanagement_suspend.php',
854
  'ICWP_WPSF_Wizard_Base' => $baseDir . '/../wizards/base.php',
855
  'ICWP_WPSF_Wizard_BaseWpsf' => $baseDir . '/../wizards/base_wpsf.php',
856
  'ICWP_WPSF_Wizard_LoginProtect' => $baseDir . '/../wizards/login_protect.php',
156
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Insert' => $baseDir . '/src/Databases/Traffic/Insert.php',
157
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Select' => $baseDir . '/src/Databases/Traffic/Select.php',
158
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Helpers\\QuickAccess' => $baseDir . '/src/Helpers/QuickAccess.php',
159
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Client\\Init' => $baseDir . '/src/Integrations/MainWP/Client/Init.php',
160
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Client\\Sync' => $baseDir . '/src/Integrations/MainWP/Client/Sync.php',
161
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\MainWPVO' => $baseDir . '/src/Integrations/MainWP/Common/MainWPVO.php',
162
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\SyncMetaVO' => $baseDir . '/src/Integrations/MainWP/Common/SyncMetaVO.php',
163
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\SyncVO' => $baseDir . '/src/Integrations/MainWP/Common/SyncVO.php',
164
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Controller' => $baseDir . '/src/Integrations/MainWP/Controller.php',
165
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\Data\\SyncHandler' => $baseDir . '/src/Integrations/MainWP/Server/Data/SyncHandler.php',
166
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\Init' => $baseDir . '/src/Integrations/MainWP/Server/Init.php',
167
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\ExtensionSettingsPage' => $baseDir . '/src/Integrations/MainWP/Server/UI/ExtensionSettingsPage.php',
168
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\PageRender\\BaseRender' => $baseDir . '/src/Integrations/MainWP/Server/UI/PageRender/BaseRender.php',
169
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\PageRender\\Sites' => $baseDir . '/src/Integrations/MainWP/Server/UI/PageRender/Sites.php',
170
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\SitesListTableHandler' => $baseDir . '/src/Integrations/MainWP/Server/UI/SitesListTableHandler.php',
171
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\License\\EddLicenseVO' => $baseDir . '/src/License/EddLicenseVO.php',
172
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\AjaxHandler' => $baseDir . '/src/Modules/AuditTrail/AjaxHandler.php',
173
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\Auditors\\Base' => $baseDir . '/src/Modules/AuditTrail/Auditors/Base.php',
200
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\BaseReporting' => $baseDir . '/src/Modules/Base/BaseReporting.php',
201
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Debug' => $baseDir . '/src/Modules/Base/Debug.php',
202
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Insights\\OverviewCards' => $baseDir . '/src/Modules/Base/Insights/OverviewCards.php',
 
203
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => $baseDir . '/src/Modules/Base/Options.php',
204
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options\\OptValueSanitize' => $baseDir . '/src/Modules/Base/Options/OptValueSanitize.php',
205
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => $baseDir . '/src/Modules/Base/ShieldOptions.php',
261
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Restore' => $baseDir . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Restore.php',
262
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Verify' => $baseDir . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Verify.php',
263
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\FileLockerAlerts' => $baseDir . '/src/Modules/HackGuard/Lib/Reports/FileLockerAlerts.php',
264
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\Query\\ScanCounts' => $baseDir . '/src/Modules/HackGuard/Lib/Reports/Query/ScanCounts.php',
265
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\ScanAlerts' => $baseDir . '/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php',
266
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesForAsset' => $baseDir . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesForAsset.php',
267
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesFromApi' => $baseDir . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesFromApi.php',
862
  'ICWP_WPSF_Processor_UserManagement' => $baseDir . '/../processors/user_management.php',
863
  'ICWP_WPSF_Processor_UserManagement_Passwords' => $baseDir . '/../processors/usermanagement_passwords.php',
864
  'ICWP_WPSF_Processor_UserManagement_Sessions' => $baseDir . '/../processors/usermanagement_sessions.php',
 
865
  'ICWP_WPSF_Wizard_Base' => $baseDir . '/../wizards/base.php',
866
  'ICWP_WPSF_Wizard_BaseWpsf' => $baseDir . '/../wizards/base_wpsf.php',
867
  'ICWP_WPSF_Wizard_LoginProtect' => $baseDir . '/../wizards/login_protect.php',
src/lib/vendor/composer/autoload_static.php CHANGED
@@ -323,6 +323,18 @@ class ComposerStaticInitc033edbeedae962d195a0e6365975a5a
323
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Insert' => __DIR__ . '/../..' . '/src/Databases/Traffic/Insert.php',
324
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Select' => __DIR__ . '/../..' . '/src/Databases/Traffic/Select.php',
325
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Helpers\\QuickAccess' => __DIR__ . '/../..' . '/src/Helpers/QuickAccess.php',
 
 
 
 
 
 
 
 
 
 
 
 
326
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\License\\EddLicenseVO' => __DIR__ . '/../..' . '/src/License/EddLicenseVO.php',
327
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/AuditTrail/AjaxHandler.php',
328
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\Auditors\\Base' => __DIR__ . '/../..' . '/src/Modules/AuditTrail/Auditors/Base.php',
@@ -355,7 +367,6 @@ class ComposerStaticInitc033edbeedae962d195a0e6365975a5a
355
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\BaseReporting' => __DIR__ . '/../..' . '/src/Modules/Base/BaseReporting.php',
356
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Debug' => __DIR__ . '/../..' . '/src/Modules/Base/Debug.php',
357
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Insights\\OverviewCards' => __DIR__ . '/../..' . '/src/Modules/Base/Insights/OverviewCards.php',
358
- 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\OneTimeExecute' => __DIR__ . '/../..' . '/src/Modules/Base/OneTimeExecute.php',
359
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => __DIR__ . '/../..' . '/src/Modules/Base/Options.php',
360
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options\\OptValueSanitize' => __DIR__ . '/../..' . '/src/Modules/Base/Options/OptValueSanitize.php',
361
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => __DIR__ . '/../..' . '/src/Modules/Base/ShieldOptions.php',
@@ -417,6 +428,7 @@ class ComposerStaticInitc033edbeedae962d195a0e6365975a5a
417
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Restore' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Restore.php',
418
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Verify' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Verify.php',
419
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\FileLockerAlerts' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Reports/FileLockerAlerts.php',
 
420
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\ScanAlerts' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php',
421
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesForAsset' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesForAsset.php',
422
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesFromApi' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesFromApi.php',
@@ -1017,7 +1029,6 @@ class ComposerStaticInitc033edbeedae962d195a0e6365975a5a
1017
  'ICWP_WPSF_Processor_UserManagement' => __DIR__ . '/../..' . '/../processors/user_management.php',
1018
  'ICWP_WPSF_Processor_UserManagement_Passwords' => __DIR__ . '/../..' . '/../processors/usermanagement_passwords.php',
1019
  'ICWP_WPSF_Processor_UserManagement_Sessions' => __DIR__ . '/../..' . '/../processors/usermanagement_sessions.php',
1020
- 'ICWP_WPSF_Processor_UserManagement_Suspend' => __DIR__ . '/../..' . '/../processors/usermanagement_suspend.php',
1021
  'ICWP_WPSF_Wizard_Base' => __DIR__ . '/../..' . '/../wizards/base.php',
1022
  'ICWP_WPSF_Wizard_BaseWpsf' => __DIR__ . '/../..' . '/../wizards/base_wpsf.php',
1023
  'ICWP_WPSF_Wizard_LoginProtect' => __DIR__ . '/../..' . '/../wizards/login_protect.php',
323
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Insert' => __DIR__ . '/../..' . '/src/Databases/Traffic/Insert.php',
324
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Traffic\\Select' => __DIR__ . '/../..' . '/src/Databases/Traffic/Select.php',
325
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Helpers\\QuickAccess' => __DIR__ . '/../..' . '/src/Helpers/QuickAccess.php',
326
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Client\\Init' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Client/Init.php',
327
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Client\\Sync' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Client/Sync.php',
328
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\MainWPVO' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Common/MainWPVO.php',
329
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\SyncMetaVO' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Common/SyncMetaVO.php',
330
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Common\\SyncVO' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Common/SyncVO.php',
331
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Controller' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Controller.php',
332
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\Data\\SyncHandler' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/Data/SyncHandler.php',
333
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\Init' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/Init.php',
334
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\ExtensionSettingsPage' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/UI/ExtensionSettingsPage.php',
335
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\PageRender\\BaseRender' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/UI/PageRender/BaseRender.php',
336
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\PageRender\\Sites' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/UI/PageRender/Sites.php',
337
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Integrations\\MainWP\\Server\\UI\\SitesListTableHandler' => __DIR__ . '/../..' . '/src/Integrations/MainWP/Server/UI/SitesListTableHandler.php',
338
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\License\\EddLicenseVO' => __DIR__ . '/../..' . '/src/License/EddLicenseVO.php',
339
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/AuditTrail/AjaxHandler.php',
340
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\AuditTrail\\Auditors\\Base' => __DIR__ . '/../..' . '/src/Modules/AuditTrail/Auditors/Base.php',
367
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\BaseReporting' => __DIR__ . '/../..' . '/src/Modules/Base/BaseReporting.php',
368
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Debug' => __DIR__ . '/../..' . '/src/Modules/Base/Debug.php',
369
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Insights\\OverviewCards' => __DIR__ . '/../..' . '/src/Modules/Base/Insights/OverviewCards.php',
 
370
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => __DIR__ . '/../..' . '/src/Modules/Base/Options.php',
371
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options\\OptValueSanitize' => __DIR__ . '/../..' . '/src/Modules/Base/Options/OptValueSanitize.php',
372
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => __DIR__ . '/../..' . '/src/Modules/Base/ShieldOptions.php',
428
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Restore' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Restore.php',
429
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\FileLocker\\Ops\\Verify' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/FileLocker/Ops/Verify.php',
430
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\FileLockerAlerts' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Reports/FileLockerAlerts.php',
431
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\Query\\ScanCounts' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Reports/Query/ScanCounts.php',
432
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Reports\\ScanAlerts' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php',
433
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesForAsset' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesForAsset.php',
434
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Lib\\Snapshots\\Build\\BuildHashesFromApi' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Lib/Snapshots/Build/BuildHashesFromApi.php',
1029
  'ICWP_WPSF_Processor_UserManagement' => __DIR__ . '/../..' . '/../processors/user_management.php',
1030
  'ICWP_WPSF_Processor_UserManagement_Passwords' => __DIR__ . '/../..' . '/../processors/usermanagement_passwords.php',
1031
  'ICWP_WPSF_Processor_UserManagement_Sessions' => __DIR__ . '/../..' . '/../processors/usermanagement_sessions.php',
 
1032
  'ICWP_WPSF_Wizard_Base' => __DIR__ . '/../..' . '/../wizards/base.php',
1033
  'ICWP_WPSF_Wizard_BaseWpsf' => __DIR__ . '/../..' . '/../wizards/base_wpsf.php',
1034
  'ICWP_WPSF_Wizard_LoginProtect' => __DIR__ . '/../..' . '/../wizards/login_protect.php',
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Net/IpIdentify.php CHANGED
@@ -76,6 +76,9 @@ class IpIdentify {
76
  elseif ( $srvProviders->isIp_DuckDuckGoBot( $this->ip, $this->agent ) ) {
77
  $is = self::DUCKDUCKGO;
78
  }
 
 
 
79
  elseif ( $srvProviders->isIp_HuaweiBot( $this->ip, $this->agent ) ) {
80
  $is = self::HUAWEI;
81
  }
76
  elseif ( $srvProviders->isIp_DuckDuckGoBot( $this->ip, $this->agent ) ) {
77
  $is = self::DUCKDUCKGO;
78
  }
79
+ elseif ( $srvProviders->isIp_GoogleBot( $this->ip, $this->agent ) ) {
80
+ $is = self::GOOGLE;
81
+ }
82
  elseif ( $srvProviders->isIp_HuaweiBot( $this->ip, $this->agent ) ) {
83
  $is = self::HUAWEI;
84
  }
src/lib/vendor/symfony/polyfill-ctype/bootstrap.php CHANGED
@@ -12,35 +12,35 @@
12
  use Symfony\Polyfill\Ctype as p;
13
 
14
  if (!function_exists('ctype_alnum')) {
15
- function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
16
  }
17
  if (!function_exists('ctype_alpha')) {
18
- function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
19
  }
20
  if (!function_exists('ctype_cntrl')) {
21
- function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
22
  }
23
  if (!function_exists('ctype_digit')) {
24
- function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
25
  }
26
  if (!function_exists('ctype_graph')) {
27
- function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
28
  }
29
  if (!function_exists('ctype_lower')) {
30
- function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
31
  }
32
  if (!function_exists('ctype_print')) {
33
- function ctype_print($text) { return p\Ctype::ctype_print($text); }
34
  }
35
  if (!function_exists('ctype_punct')) {
36
- function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
37
  }
38
  if (!function_exists('ctype_space')) {
39
- function ctype_space($text) { return p\Ctype::ctype_space($text); }
40
  }
41
  if (!function_exists('ctype_upper')) {
42
- function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
43
  }
44
  if (!function_exists('ctype_xdigit')) {
45
- function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
46
  }
12
  use Symfony\Polyfill\Ctype as p;
13
 
14
  if (!function_exists('ctype_alnum')) {
15
+ function ctype_alnum($input) { return p\Ctype::ctype_alnum($input); }
16
  }
17
  if (!function_exists('ctype_alpha')) {
18
+ function ctype_alpha($input) { return p\Ctype::ctype_alpha($input); }
19
  }
20
  if (!function_exists('ctype_cntrl')) {
21
+ function ctype_cntrl($input) { return p\Ctype::ctype_cntrl($input); }
22
  }
23
  if (!function_exists('ctype_digit')) {
24
+ function ctype_digit($input) { return p\Ctype::ctype_digit($input); }
25
  }
26
  if (!function_exists('ctype_graph')) {
27
+ function ctype_graph($input) { return p\Ctype::ctype_graph($input); }
28
  }
29
  if (!function_exists('ctype_lower')) {
30
+ function ctype_lower($input) { return p\Ctype::ctype_lower($input); }
31
  }
32
  if (!function_exists('ctype_print')) {
33
+ function ctype_print($input) { return p\Ctype::ctype_print($input); }
34
  }
35
  if (!function_exists('ctype_punct')) {
36
+ function ctype_punct($input) { return p\Ctype::ctype_punct($input); }
37
  }
38
  if (!function_exists('ctype_space')) {
39
+ function ctype_space($input) { return p\Ctype::ctype_space($input); }
40
  }
41
  if (!function_exists('ctype_upper')) {
42
+ function ctype_upper($input) { return p\Ctype::ctype_upper($input); }
43
  }
44
  if (!function_exists('ctype_xdigit')) {
45
+ function ctype_xdigit($input) { return p\Ctype::ctype_xdigit($input); }
46
  }
src/lib/vendor/symfony/polyfill-iconv/Iconv.php CHANGED
@@ -541,10 +541,14 @@ final class Iconv
541
  $start += $slen;
542
  }
543
  if (0 > $start) {
544
- return false;
 
 
 
 
545
  }
546
  if ($start >= $slen) {
547
- return false;
548
  }
549
 
550
  $rx = $slen - $start;
@@ -556,7 +560,7 @@ final class Iconv
556
  return '';
557
  }
558
  if (0 > $length) {
559
- return false;
560
  }
561
 
562
  if ($length > $rx) {
541
  $start += $slen;
542
  }
543
  if (0 > $start) {
544
+ if (\PHP_VERSION_ID < 80000) {
545
+ return false;
546
+ }
547
+
548
+ $start = 0;
549
  }
550
  if ($start >= $slen) {
551
+ return \PHP_VERSION_ID >= 80000 ? '' : false;
552
  }
553
 
554
  $rx = $slen - $start;
560
  return '';
561
  }
562
  if (0 > $length) {
563
+ return \PHP_VERSION_ID >= 80000 ? '' : false;
564
  }
565
 
566
  if ($length > $rx) {
src/lib/vendor/symfony/polyfill-iconv/bootstrap.php CHANGED
@@ -29,56 +29,56 @@ if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) {
29
  }
30
 
31
  if (!function_exists('iconv')) {
32
- function iconv($from, $to, $s) { return p\Iconv::iconv($from, $to, $s); }
33
  }
34
  if (!function_exists('iconv_get_encoding')) {
35
  function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); }
36
  }
37
  if (!function_exists('iconv_set_encoding')) {
38
- function iconv_set_encoding($type, $charset) { return p\Iconv::iconv_set_encoding($type, $charset); }
39
  }
40
  if (!function_exists('iconv_mime_encode')) {
41
- function iconv_mime_encode($name, $value, $pref = null) { return p\Iconv::iconv_mime_encode($name, $value, $pref); }
42
  }
43
  if (!function_exists('iconv_mime_decode_headers')) {
44
- function iconv_mime_decode_headers($encodedHeaders, $mode = 0, $enc = null) { return p\Iconv::iconv_mime_decode_headers($encodedHeaders, $mode, $enc); }
45
  }
46
 
47
  if (extension_loaded('mbstring')) {
48
  if (!function_exists('iconv_strlen')) {
49
- function iconv_strlen($s, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strlen($s, $enc); }
50
  }
51
  if (!function_exists('iconv_strpos')) {
52
- function iconv_strpos($s, $needle, $offset = 0, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strpos($s, $needle, $offset, $enc); }
53
  }
54
  if (!function_exists('iconv_strrpos')) {
55
- function iconv_strrpos($s, $needle, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_strrpos($s, $needle, 0, $enc); }
56
  }
57
  if (!function_exists('iconv_substr')) {
58
- function iconv_substr($s, $start, $length = 2147483647, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_substr($s, $start, $length, $enc); }
59
  }
60
  if (!function_exists('iconv_mime_decode')) {
61
- function iconv_mime_decode($encodedHeaders, $mode = 0, $enc = null) { null === $enc and $enc = p\Iconv::$internalEncoding; return mb_decode_mimeheader($encodedHeaders, $mode, $enc); }
62
  }
63
  } else {
64
  if (!function_exists('iconv_strlen')) {
65
  if (extension_loaded('xml')) {
66
- function iconv_strlen($s, $enc = null) { return p\Iconv::strlen1($s, $enc); }
67
  } else {
68
- function iconv_strlen($s, $enc = null) { return p\Iconv::strlen2($s, $enc); }
69
  }
70
  }
71
 
72
  if (!function_exists('iconv_strpos')) {
73
- function iconv_strpos($s, $needle, $offset = 0, $enc = null) { return p\Iconv::iconv_strpos($s, $needle, $offset, $enc); }
74
  }
75
  if (!function_exists('iconv_strrpos')) {
76
- function iconv_strrpos($s, $needle, $enc = null) { return p\Iconv::iconv_strrpos($s, $needle, $enc); }
77
  }
78
  if (!function_exists('iconv_substr')) {
79
- function iconv_substr($s, $start, $length = 2147483647, $enc = null) { return p\Iconv::iconv_substr($s, $start, $length, $enc); }
80
  }
81
  if (!function_exists('iconv_mime_decode')) {
82
- function iconv_mime_decode($encodedHeaders, $mode = 0, $enc = null) { return p\Iconv::iconv_mime_decode($encodedHeaders, $mode, $enc); }
83
  }
84
  }
29
  }
30
 
31
  if (!function_exists('iconv')) {
32
+ function iconv($from_encoding, $to_encoding, $string) { return p\Iconv::iconv($from_encoding, $to_encoding, $string); }
33
  }
34
  if (!function_exists('iconv_get_encoding')) {
35
  function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); }
36
  }
37
  if (!function_exists('iconv_set_encoding')) {
38
+ function iconv_set_encoding($type, $encoding) { return p\Iconv::iconv_set_encoding($type, $encoding); }
39
  }
40
  if (!function_exists('iconv_mime_encode')) {
41
+ function iconv_mime_encode($field_name, $field_value, $options = null) { return p\Iconv::iconv_mime_encode($field_name, $field_value, $options); }
42
  }
43
  if (!function_exists('iconv_mime_decode_headers')) {
44
+ function iconv_mime_decode_headers($headers, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode_headers($headers, $mode, $encoding); }
45
  }
46
 
47
  if (extension_loaded('mbstring')) {
48
  if (!function_exists('iconv_strlen')) {
49
+ function iconv_strlen($string, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen($string, $encoding); }
50
  }
51
  if (!function_exists('iconv_strpos')) {
52
+ function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos($haystack, $needle, $offset, $encoding); }
53
  }
54
  if (!function_exists('iconv_strrpos')) {
55
+ function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); }
56
  }
57
  if (!function_exists('iconv_substr')) {
58
+ function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr($string, $offset, $length, $encoding); }
59
  }
60
  if (!function_exists('iconv_mime_decode')) {
61
+ function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); }
62
  }
63
  } else {
64
  if (!function_exists('iconv_strlen')) {
65
  if (extension_loaded('xml')) {
66
+ function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen1($string, $encoding); }
67
  } else {
68
+ function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen2($string, $encoding); }
69
  }
70
  }
71
 
72
  if (!function_exists('iconv_strpos')) {
73
+ function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Iconv::iconv_strpos($haystack, $needle, $offset, $encoding); }
74
  }
75
  if (!function_exists('iconv_strrpos')) {
76
+ function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); }
77
  }
78
  if (!function_exists('iconv_substr')) {
79
+ function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { return p\Iconv::iconv_substr($string, $offset, $length, $encoding); }
80
  }
81
  if (!function_exists('iconv_mime_decode')) {
82
+ function iconv_mime_decode($string, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode($string, $mode, $encoding); }
83
  }
84
  }
src/lib/vendor/symfony/polyfill-mbstring/Mbstring.php CHANGED
@@ -629,10 +629,11 @@ final class Mbstring
629
  {
630
  $encoding = self::getEncoding($encoding);
631
  if ('CP850' === $encoding || 'ASCII' === $encoding) {
632
- return strrchr($haystack, $needle, $part);
 
 
 
633
  }
634
- $needle = self::mb_substr($needle, 0, 1, $encoding);
635
- $pos = iconv_strrpos($haystack, $needle, $encoding);
636
 
637
  return self::getSubpart($pos, $part, $haystack, $encoding);
638
  }
629
  {
630
  $encoding = self::getEncoding($encoding);
631
  if ('CP850' === $encoding || 'ASCII' === $encoding) {
632
+ $pos = strrpos($haystack, $needle);
633
+ } else {
634
+ $needle = self::mb_substr($needle, 0, 1, $encoding);
635
+ $pos = iconv_strrpos($haystack, $needle, $encoding);
636
  }
 
 
637
 
638
  return self::getSubpart($pos, $part, $haystack, $encoding);
639
  }
src/lib/vendor/symfony/polyfill-mbstring/Resources/mb_convert_variables.php8 ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ use Symfony\Polyfill\Mbstring as p;
13
+
14
+ if (!function_exists('mb_convert_variables')) {
15
+ /**
16
+ * Convert character code in variable(s)
17
+ */
18
+ function mb_convert_variables($to_encoding, $from_encoding, &$var, &...$vars)
19
+ {
20
+ $vars = [&$var, ...$vars];
21
+
22
+ $ok = true;
23
+ array_walk_recursive($vars, function (&$v) use (&$ok, $to_encoding, $from_encoding) {
24
+ if (false === $v = p\Mbstring::mb_convert_encoding($v, $to_encoding, $from_encoding)) {
25
+ $ok = false;
26
+ }
27
+ });
28
+
29
+ return $ok ? $from_encoding : false;
30
+ }
31
+ }
src/lib/vendor/symfony/polyfill-mbstring/bootstrap.php CHANGED
@@ -12,28 +12,28 @@
12
  use Symfony\Polyfill\Mbstring as p;
13
 
14
  if (!function_exists('mb_convert_encoding')) {
15
- function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
16
  }
17
  if (!function_exists('mb_decode_mimeheader')) {
18
- function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
19
  }
20
  if (!function_exists('mb_encode_mimeheader')) {
21
- function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
22
  }
23
  if (!function_exists('mb_decode_numericentity')) {
24
- function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
25
  }
26
  if (!function_exists('mb_encode_numericentity')) {
27
- function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
28
  }
29
  if (!function_exists('mb_convert_case')) {
30
- function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
31
  }
32
  if (!function_exists('mb_internal_encoding')) {
33
- function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
34
  }
35
  if (!function_exists('mb_language')) {
36
- function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
37
  }
38
  if (!function_exists('mb_list_encodings')) {
39
  function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
@@ -42,88 +42,92 @@ if (!function_exists('mb_encoding_aliases')) {
42
  function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
43
  }
44
  if (!function_exists('mb_check_encoding')) {
45
- function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
46
  }
47
  if (!function_exists('mb_detect_encoding')) {
48
- function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
49
  }
50
  if (!function_exists('mb_detect_order')) {
51
- function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
52
  }
53
  if (!function_exists('mb_parse_str')) {
54
- function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
55
  }
56
  if (!function_exists('mb_strlen')) {
57
- function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
58
  }
59
  if (!function_exists('mb_strpos')) {
60
- function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
61
  }
62
  if (!function_exists('mb_strtolower')) {
63
- function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
64
  }
65
  if (!function_exists('mb_strtoupper')) {
66
- function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
67
  }
68
  if (!function_exists('mb_substitute_character')) {
69
- function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
70
  }
71
  if (!function_exists('mb_substr')) {
72
- function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
73
  }
74
  if (!function_exists('mb_stripos')) {
75
- function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
76
  }
77
  if (!function_exists('mb_stristr')) {
78
- function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
79
  }
80
  if (!function_exists('mb_strrchr')) {
81
- function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
82
  }
83
  if (!function_exists('mb_strrichr')) {
84
- function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
85
  }
86
  if (!function_exists('mb_strripos')) {
87
- function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
88
  }
89
  if (!function_exists('mb_strrpos')) {
90
- function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
91
  }
92
  if (!function_exists('mb_strstr')) {
93
- function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
94
  }
95
  if (!function_exists('mb_get_info')) {
96
  function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
97
  }
98
  if (!function_exists('mb_http_output')) {
99
- function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
100
  }
101
  if (!function_exists('mb_strwidth')) {
102
- function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
103
  }
104
  if (!function_exists('mb_substr_count')) {
105
- function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
106
  }
107
  if (!function_exists('mb_output_handler')) {
108
- function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
109
  }
110
  if (!function_exists('mb_http_input')) {
111
  function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
112
  }
113
- if (!function_exists('mb_convert_variables')) {
 
 
 
114
  function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
115
  }
 
116
  if (!function_exists('mb_ord')) {
117
- function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
118
  }
119
  if (!function_exists('mb_chr')) {
120
- function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
121
  }
122
  if (!function_exists('mb_scrub')) {
123
- function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
124
  }
125
  if (!function_exists('mb_str_split')) {
126
- function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
127
  }
128
 
129
  if (extension_loaded('mbstring')) {
12
  use Symfony\Polyfill\Mbstring as p;
13
 
14
  if (!function_exists('mb_convert_encoding')) {
15
+ function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
16
  }
17
  if (!function_exists('mb_decode_mimeheader')) {
18
+ function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
19
  }
20
  if (!function_exists('mb_encode_mimeheader')) {
21
+ function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
22
  }
23
  if (!function_exists('mb_decode_numericentity')) {
24
+ function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
25
  }
26
  if (!function_exists('mb_encode_numericentity')) {
27
+ function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
28
  }
29
  if (!function_exists('mb_convert_case')) {
30
+ function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
31
  }
32
  if (!function_exists('mb_internal_encoding')) {
33
+ function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
34
  }
35
  if (!function_exists('mb_language')) {
36
+ function mb_language($language = null) { return p\Mbstring::mb_language($language); }
37
  }
38
  if (!function_exists('mb_list_encodings')) {
39
  function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
42
  function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
43
  }
44
  if (!function_exists('mb_check_encoding')) {
45
+ function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
46
  }
47
  if (!function_exists('mb_detect_encoding')) {
48
+ function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
49
  }
50
  if (!function_exists('mb_detect_order')) {
51
+ function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
52
  }
53
  if (!function_exists('mb_parse_str')) {
54
+ function mb_parse_str($string, &$result = array()) { parse_str($string, $result); }
55
  }
56
  if (!function_exists('mb_strlen')) {
57
+ function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
58
  }
59
  if (!function_exists('mb_strpos')) {
60
+ function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
61
  }
62
  if (!function_exists('mb_strtolower')) {
63
+ function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
64
  }
65
  if (!function_exists('mb_strtoupper')) {
66
+ function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
67
  }
68
  if (!function_exists('mb_substitute_character')) {
69
+ function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
70
  }
71
  if (!function_exists('mb_substr')) {
72
+ function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
73
  }
74
  if (!function_exists('mb_stripos')) {
75
+ function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
76
  }
77
  if (!function_exists('mb_stristr')) {
78
+ function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
79
  }
80
  if (!function_exists('mb_strrchr')) {
81
+ function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
82
  }
83
  if (!function_exists('mb_strrichr')) {
84
+ function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
85
  }
86
  if (!function_exists('mb_strripos')) {
87
+ function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
88
  }
89
  if (!function_exists('mb_strrpos')) {
90
+ function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
91
  }
92
  if (!function_exists('mb_strstr')) {
93
+ function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
94
  }
95
  if (!function_exists('mb_get_info')) {
96
  function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
97
  }
98
  if (!function_exists('mb_http_output')) {
99
+ function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
100
  }
101
  if (!function_exists('mb_strwidth')) {
102
+ function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
103
  }
104
  if (!function_exists('mb_substr_count')) {
105
+ function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
106
  }
107
  if (!function_exists('mb_output_handler')) {
108
+ function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
109
  }
110
  if (!function_exists('mb_http_input')) {
111
  function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
112
  }
113
+
114
+ if (PHP_VERSION_ID >= 80000) {
115
+ require_once __DIR__.'/Resources/mb_convert_variables.php8';
116
+ } elseif (!function_exists('mb_convert_variables')) {
117
  function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
118
  }
119
+
120
  if (!function_exists('mb_ord')) {
121
+ function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
122
  }
123
  if (!function_exists('mb_chr')) {
124
+ function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
125
  }
126
  if (!function_exists('mb_scrub')) {
127
+ function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
128
  }
129
  if (!function_exists('mb_str_split')) {
130
+ function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
131
  }
132
 
133
  if (extension_loaded('mbstring')) {
src/processors/admin_access_restriction.php CHANGED
@@ -12,15 +12,14 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
12
  protected $sOptionRegexPattern;
13
 
14
  public function run() {
15
- /** @var SecurityAdmin\Options $oOpts */
16
- $oOpts = $this->getOptions();
17
-
18
  add_filter( $this->getCon()->prefix( 'is_plugin_admin' ), [ $this, 'adjustUserAdminPermissions' ] );
19
 
20
- if ( $oOpts->isEnabledWhitelabel() ) {
21
- ( new SecurityAdmin\Lib\WhiteLabel\ApplyLabels() )
22
- ->setMod( $this->getMod() )
23
- ->run();
 
 
24
  }
25
  }
26
 
@@ -29,24 +28,24 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
29
  * @return bool
30
  */
31
  public function adjustUserAdminPermissions( $bHasPermission = true ) {
32
- /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
33
- $oMod = $this->getMod();
34
- return $bHasPermission && ( $oMod->isRegisteredSecAdminUser() || $oMod->isSecAdminSessionValid()
35
- || $oMod->testSecAccessKeyRequest() );
36
  }
37
 
38
  public function onWpInit() {
39
  if ( !$this->getCon()->isPluginAdmin() ) {
40
- /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
41
- $oMod = $this->getMod();
42
- /** @var SecurityAdmin\Options $oOpts */
43
- $oOpts = $this->getOptions();
44
 
45
- if ( !$oMod->isUpgrading() && !Services::WpGeneral()->isLoginRequest() ) {
46
  add_filter( 'pre_update_option', [ $this, 'blockOptionsSaves' ], 1, 3 );
47
  }
48
 
49
- if ( $oOpts->isSecAdminRestrictUsersEnabled() ) {
50
  add_filter( 'editable_roles', [ $this, 'restrictEditableRoles' ], 100, 1 );
51
  add_filter( 'user_has_cap', [ $this, 'restrictAdminUserChanges' ], 100, 3 );
52
  add_action( 'delete_user', [ $this, 'restrictAdminUserDelete' ], 100, 1 );
@@ -55,17 +54,17 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
55
  add_action( 'set_user_role', [ $this, 'restrictSetUserRole' ], 100, 3 );
56
  }
57
 
58
- $aPluginRestrictions = $oOpts->getAdminAccessArea_Plugins();
59
  if ( !empty( $aPluginRestrictions ) ) {
60
  add_filter( 'user_has_cap', [ $this, 'disablePluginManipulation' ], 0, 3 );
61
  }
62
 
63
- $aThemeRestrictions = $oOpts->getAdminAccessArea_Themes();
64
  if ( !empty( $aThemeRestrictions ) ) {
65
  add_filter( 'user_has_cap', [ $this, 'disableThemeManipulation' ], 0, 3 );
66
  }
67
 
68
- $aPostRestrictions = $oOpts->getAdminAccessArea_Posts();
69
  if ( !empty( $aPostRestrictions ) ) {
70
  add_filter( 'user_has_cap', [ $this, 'disablePostsManipulation' ], 0, 3 );
71
  }
@@ -250,10 +249,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
250
  return $aAllCaps;
251
  }
252
 
253
- /**
254
- * @return array
255
- */
256
- protected function getUserPagesToRestrict() {
257
  return [
258
  /* 'user-new.php', */
259
  'user-edit.php',
@@ -268,44 +264,29 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
268
  * Right before a plugin option is due to update it will check that we have permissions to do so
269
  * and if not, will * revert the option to save to the previous one.
270
  * @param mixed $mNewOptionValue
271
- * @param string $sOptionKey
272
  * @param mixed $mOldValue
273
  * @return mixed
274
  */
275
- public function blockOptionsSaves( $mNewOptionValue, $sOptionKey, $mOldValue ) {
276
 
277
- if ( !$this->getCon()->isPluginAdmin()
278
- && ( $this->isOptionForThisPlugin( $sOptionKey ) || $this->isOptionRestricted( $sOptionKey ) ) ) {
279
  $mNewOptionValue = $mOldValue;
280
  }
281
 
282
  return $mNewOptionValue;
283
  }
284
 
285
- /**
286
- * @param string $sOptionKey
287
- * @return int
288
- */
289
- protected function isOptionForThisPlugin( $sOptionKey ) {
290
- return preg_match( $this->getOptionRegexPattern(), $sOptionKey );
291
  }
292
 
293
- /**
294
- * @param string $sOptionKey
295
- * @return int
296
- */
297
- protected function isOptionRestricted( $sOptionKey ) {
298
- $bRestricted = false;
299
- /** @var SecurityAdmin\Options $oOpts */
300
- $oOpts = $this->getOptions();
301
-
302
- if ( $oOpts->getAdminAccessArea_Options() ) {
303
- $bRestricted = in_array(
304
- $sOptionKey,
305
- $oOpts->getOptionsToRestrict()
306
- );
307
- }
308
- return $bRestricted;
309
  }
310
 
311
  /**
@@ -315,9 +296,9 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
315
  * @return array
316
  */
317
  public function disablePluginManipulation( $aAllCaps, $cap, $aArgs ) {
318
- /** @var SecurityAdmin\Options $oOpts */
319
- $oOpts = $this->getOptions();
320
- $oReq = Services::Request();
321
 
322
  /** @var string $sRequestedCapability */
323
  $sRequestedCapability = $aArgs[ 0 ];
@@ -325,8 +306,8 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
325
  // special case for plugin info thickbox for changelog
326
  $bIsChangelog = defined( 'IFRAME_REQUEST' )
327
  && ( $sRequestedCapability === 'install_plugins' )
328
- && ( $oReq->query( 'section' ) == 'changelog' )
329
- && $oReq->query( 'plugin' );
330
  if ( $bIsChangelog ) {
331
  return $aAllCaps;
332
  }
@@ -334,7 +315,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
334
  $aEditCapabilities = [ 'activate_plugins', 'delete_plugins', 'install_plugins', 'update_plugins' ];
335
 
336
  if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
337
- $aAreaRestrictions = $oOpts->getAdminAccessArea_Plugins();
338
  if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
339
  $aAllCaps[ $sRequestedCapability ] = false;
340
  }
@@ -355,8 +336,8 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
355
  return $aAllCaps;
356
  }
357
 
358
- /** @var SecurityAdmin\Options $oOpts */
359
- $oOpts = $this->getOptions();
360
 
361
  /** @var string $sRequestedCapability */
362
  $sRequestedCapability = $aArgs[ 0 ];
@@ -369,7 +350,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
369
  ];
370
 
371
  if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
372
- $aAreaRestrictions = $oOpts->getAdminAccessArea_Themes();
373
  if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
374
  $aAllCaps[ $sRequestedCapability ] = false;
375
  }
@@ -381,19 +362,19 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
381
  /**
382
  * @param array $aAllCaps
383
  * @param $cap
384
- * @param array $aArgs
385
  * @return array
386
  */
387
- public function disablePostsManipulation( $aAllCaps, $cap, $aArgs ) {
388
  if ( $this->getCon()->isPluginAdmin() ) {
389
  return $aAllCaps;
390
  }
391
 
392
- /** @var SecurityAdmin\Options $oOpts */
393
- $oOpts = $this->getOptions();
394
 
395
  /** @var string $sRequestedCapability */
396
- $sRequestedCapability = $aArgs[ 0 ];
397
  $aEditCapabilities = [
398
  'edit_post',
399
  'publish_post',
@@ -415,7 +396,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
415
  '_post',
416
  '_page'
417
  ], '', $sRequestedCapability ); //Order of items in this array is important!
418
- $aAreaRestrictions = $oOpts->getAdminAccessArea_Posts();
419
  if ( in_array( $sRequestedCapabilityTrimmed, $aAreaRestrictions ) ) {
420
  $aAllCaps[ $sRequestedCapability ] = false;
421
  }
@@ -438,19 +419,19 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\Shie
438
  public function printAdminAccessAjaxForm() {
439
  /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
440
  $mod = $this->getMod();
441
- /** @var SecurityAdmin\Options $oOpts */
442
- $oOpts = $this->getOptions();
443
 
444
  $aRenderData = [
445
  'flags' => [
446
- 'restrict_options' => $oOpts->getAdminAccessArea_Options()
447
  ],
448
  'strings' => [
449
  'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
450
  'unlock_link' => $this->getUnlockLinkHtml(),
451
  ],
452
  'js_snippets' => [
453
- 'options_to_restrict' => "'".implode( "','", $oOpts->getOptionsToRestrict() )."'",
454
  ],
455
  'ajax' => [
456
  'sec_admin_login_box' => $mod->getAjaxActionData( 'sec_admin_login_box', true )
12
  protected $sOptionRegexPattern;
13
 
14
  public function run() {
 
 
 
15
  add_filter( $this->getCon()->prefix( 'is_plugin_admin' ), [ $this, 'adjustUserAdminPermissions' ] );
16
 
17
+ /** @var SecurityAdmin\Options $opts */
18
+ $opts = $this->getOptions();
19
+ if ( $opts->isEnabledWhitelabel() ) {
20
+ /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
21
+ $mod = $this->getMod();
22
+ $mod->getWhiteLabelController()->execute();
23
  }
24
  }
25
 
28
  * @return bool
29
  */
30
  public function adjustUserAdminPermissions( $bHasPermission = true ) {
31
+ /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
32
+ $mod = $this->getMod();
33
+ return $bHasPermission && ( $mod->isRegisteredSecAdminUser() || $mod->isSecAdminSessionValid()
34
+ || $mod->testSecAccessKeyRequest() );
35
  }
36
 
37
  public function onWpInit() {
38
  if ( !$this->getCon()->isPluginAdmin() ) {
39
+ /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
40
+ $mod = $this->getMod();
41
+ /** @var SecurityAdmin\Options $opts */
42
+ $opts = $this->getOptions();
43
 
44
+ if ( !$mod->isUpgrading() && !Services::WpGeneral()->isLoginRequest() ) {
45
  add_filter( 'pre_update_option', [ $this, 'blockOptionsSaves' ], 1, 3 );
46
  }
47
 
48
+ if ( $opts->isSecAdminRestrictUsersEnabled() ) {
49
  add_filter( 'editable_roles', [ $this, 'restrictEditableRoles' ], 100, 1 );
50
  add_filter( 'user_has_cap', [ $this, 'restrictAdminUserChanges' ], 100, 3 );
51
  add_action( 'delete_user', [ $this, 'restrictAdminUserDelete' ], 100, 1 );
54
  add_action( 'set_user_role', [ $this, 'restrictSetUserRole' ], 100, 3 );
55
  }
56
 
57
+ $aPluginRestrictions = $opts->getAdminAccessArea_Plugins();
58
  if ( !empty( $aPluginRestrictions ) ) {
59
  add_filter( 'user_has_cap', [ $this, 'disablePluginManipulation' ], 0, 3 );
60
  }
61
 
62
+ $aThemeRestrictions = $opts->getAdminAccessArea_Themes();
63
  if ( !empty( $aThemeRestrictions ) ) {
64
  add_filter( 'user_has_cap', [ $this, 'disableThemeManipulation' ], 0, 3 );
65
  }
66
 
67
+ $aPostRestrictions = $opts->getAdminAccessArea_Posts();
68
  if ( !empty( $aPostRestrictions ) ) {
69
  add_filter( 'user_has_cap', [ $this, 'disablePostsManipulation' ], 0, 3 );
70
  }
249
  return $aAllCaps;
250
  }
251
 
252
+ protected function getUserPagesToRestrict() :array {
 
 
 
253
  return [
254
  /* 'user-new.php', */
255
  'user-edit.php',
264
  * Right before a plugin option is due to update it will check that we have permissions to do so
265
  * and if not, will * revert the option to save to the previous one.
266
  * @param mixed $mNewOptionValue
267
+ * @param string $key
268
  * @param mixed $mOldValue
269
  * @return mixed
270
  */
271
+ public function blockOptionsSaves( $mNewOptionValue, $key, $mOldValue ) {
272
 
273
+ if ( !$this->getCon()->isPluginAdmin() && is_string( $key )
274
+ && ( $this->isOptionForThisPlugin( $key ) || $this->isOptionRestricted( $key ) ) ) {
275
  $mNewOptionValue = $mOldValue;
276
  }
277
 
278
  return $mNewOptionValue;
279
  }
280
 
281
+ private function isOptionForThisPlugin( string $key ) :bool {
282
+ return preg_match( $this->getOptionRegexPattern(), $key ) > 0;
 
 
 
 
283
  }
284
 
285
+ private function isOptionRestricted( string $key ) :bool {
286
+ /** @var SecurityAdmin\Options $opts */
287
+ $opts = $this->getOptions();
288
+ return $opts->getAdminAccessArea_Options()
289
+ && in_array( $key, $opts->getOptionsToRestrict() );
 
 
 
 
 
 
 
 
 
 
 
290
  }
291
 
292
  /**
296
  * @return array
297
  */
298
  public function disablePluginManipulation( $aAllCaps, $cap, $aArgs ) {
299
+ /** @var SecurityAdmin\Options $opts */
300
+ $opts = $this->getOptions();
301
+ $req = Services::Request();
302
 
303
  /** @var string $sRequestedCapability */
304
  $sRequestedCapability = $aArgs[ 0 ];
306
  // special case for plugin info thickbox for changelog
307
  $bIsChangelog = defined( 'IFRAME_REQUEST' )
308
  && ( $sRequestedCapability === 'install_plugins' )
309
+ && ( $req->query( 'section' ) == 'changelog' )
310
+ && $req->query( 'plugin' );
311
  if ( $bIsChangelog ) {
312
  return $aAllCaps;
313
  }
315
  $aEditCapabilities = [ 'activate_plugins', 'delete_plugins', 'install_plugins', 'update_plugins' ];
316
 
317
  if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
318
+ $aAreaRestrictions = $opts->getAdminAccessArea_Plugins();
319
  if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
320
  $aAllCaps[ $sRequestedCapability ] = false;
321
  }
336
  return $aAllCaps;
337
  }
338
 
339
+ /** @var SecurityAdmin\Options $opts */
340
+ $opts = $this->getOptions();
341
 
342
  /** @var string $sRequestedCapability */
343
  $sRequestedCapability = $aArgs[ 0 ];
350
  ];
351
 
352
  if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
353
+ $aAreaRestrictions = $opts->getAdminAccessArea_Themes();
354
  if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
355
  $aAllCaps[ $sRequestedCapability ] = false;
356
  }
362
  /**
363
  * @param array $aAllCaps
364
  * @param $cap
365
+ * @param array $args
366
  * @return array
367
  */
368
+ public function disablePostsManipulation( $aAllCaps, $cap, $args ) {
369
  if ( $this->getCon()->isPluginAdmin() ) {
370
  return $aAllCaps;
371
  }
372
 
373
+ /** @var SecurityAdmin\Options $opts */
374
+ $opts = $this->getOptions();
375
 
376
  /** @var string $sRequestedCapability */
377
+ $sRequestedCapability = $args[ 0 ];
378
  $aEditCapabilities = [
379
  'edit_post',
380
  'publish_post',
396
  '_post',
397
  '_page'
398
  ], '', $sRequestedCapability ); //Order of items in this array is important!
399
+ $aAreaRestrictions = $opts->getAdminAccessArea_Posts();
400
  if ( in_array( $sRequestedCapabilityTrimmed, $aAreaRestrictions ) ) {
401
  $aAllCaps[ $sRequestedCapability ] = false;
402
  }
419
  public function printAdminAccessAjaxForm() {
420
  /** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $mod */
421
  $mod = $this->getMod();
422
+ /** @var SecurityAdmin\Options $opts */
423
+ $opts = $this->getOptions();
424
 
425
  $aRenderData = [
426
  'flags' => [
427
+ 'restrict_options' => $opts->getAdminAccessArea_Options()
428
  ],
429
  'strings' => [
430
  'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
431
  'unlock_link' => $this->getUnlockLinkHtml(),
432
  ],
433
  'js_snippets' => [
434
+ 'options_to_restrict' => "'".implode( "','", $opts->getOptionsToRestrict() )."'",
435
  ],
436
  'ajax' => [
437
  'sec_admin_login_box' => $mod->getAjaxActionData( 'sec_admin_login_box', true )