Shield Security for WordPress - Version 9.0.3

Version Description

Download this release

Release Info

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

Code changes from version 9.0.2 to 9.0.3

Files changed (44) hide show
  1. icwp-wpsf.php +1 -1
  2. plugin-spec.php +3 -3
  3. readme.txt +8 -1
  4. src/config/feature-comments_filter.php +1 -7
  5. src/config/feature-user_management.php +8 -4
  6. src/features/base.php +4 -10
  7. src/features/comments_filter.php +1 -23
  8. src/features/hack_protect.php +20 -57
  9. src/features/login_protect.php +1 -5
  10. src/features/plugin.php +6 -7
  11. src/features/user_management.php +2 -9
  12. src/lib/src/Controller/Controller.php +17 -0
  13. src/lib/src/Crons/BaseCron.php +2 -1
  14. src/lib/src/Crons/StandardCron.php +0 -4
  15. src/lib/src/Deprecated/Foundation.php +0 -59
  16. src/lib/src/Modules/Base/BaseProcessor.php +0 -1
  17. src/lib/src/Modules/Base/Lib/BaseService.php +0 -36
  18. src/lib/src/Modules/Base/Options.php +7 -3
  19. src/lib/src/Modules/Base/Upgrade.php +52 -0
  20. src/lib/src/Modules/CommentsFilter/Options.php +1 -4
  21. src/lib/src/Modules/CommentsFilter/Upgrade.php +28 -0
  22. src/lib/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php +1 -0
  23. src/lib/src/Modules/HackGuard/Upgrade.php +64 -0
  24. src/lib/src/Modules/License/Lib/WpHashes/ApiTokenManager.php +40 -16
  25. src/lib/src/Modules/LoginGuard/Lib/AntiBot/FormProviders/MemberPress.php +7 -0
  26. src/lib/src/Modules/LoginGuard/Lib/TwoFactor/Provider/Yubikey.php +1 -1
  27. src/lib/src/Modules/LoginGuard/Upgrade.php +9 -0
  28. src/lib/src/Modules/Plugin/Lib/Debug/Collate.php +13 -1
  29. src/lib/src/Modules/Plugin/Upgrade.php +14 -0
  30. src/lib/src/Modules/UserManagement/Lib/Registration/EmailValidate.php +7 -4
  31. src/lib/src/Modules/UserManagement/Strings.php +4 -1
  32. src/lib/src/Modules/UserManagement/Upgrade.php +19 -0
  33. src/lib/src/Scans/Base/Utilities/ItemActionHandler.php +5 -1
  34. src/lib/src/Scans/Mal/BuildFileMap.php +10 -7
  35. src/lib/src/Scans/Ptg/BuildFileMap.php +12 -8
  36. src/lib/src/Scans/Ufc/BuildFileMap.php +4 -5
  37. src/lib/src/Scans/Ufc/Utilities/ItemActionHandler.php +7 -0
  38. src/lib/src/ShieldNetApi/ShieldNetApiController.php +2 -3
  39. src/lib/src/Utilities/Options/CleanStorage.php +22 -0
  40. src/lib/vendor/composer/autoload_classmap.php +7 -0
  41. src/lib/vendor/composer/autoload_static.php +7 -0
  42. src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Plugins.php +15 -4
  43. src/lib/vendor/psr/cache/CHANGELOG.md +16 -0
  44. src/processors/plugin.php +4 -12
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: 9.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: 9.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": "9.0.2",
4
- "release_timestamp": 1589452434,
5
- "build": "202005.1402",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield",
1
  {
2
  "properties": {
3
+ "version": "9.0.3",
4
+ "release_timestamp": 1591270012,
5
+ "build": "202006.0402",
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: 5.4.0
9
  Recommended PHP: 7.0
10
  Tested up to: 5.4
11
- Stable tag: 9.0.2
12
 
13
  Smarter security protection from hackers through automation. Powerful scanners, 2-Factor Auth, limit logins, auto IP blocks & more.
14
 
@@ -377,6 +377,13 @@ You will always be able to use Shield Security and its free features in-full.
377
 
378
  ##### [Please review the full Shield 9.0 Upgrade Guide here](https://shsec.io/shieldupgradeguide90).
379
 
 
 
 
 
 
 
 
380
  * **(.2) IMPROVED**: Plugin/Theme Guard only scans certain types of files based on their extension. I.e. ignoring readme.txt, for example.
381
  * **(.2) IMPROVED**: Some minor improvements to encoding special characters in the email subject/from name.
382
  * **(.2) IMPROVED**: [WPHashes.com](https://shsec.io/hs) API token update is more reliable.
8
  Requires PHP: 5.4.0
9
  Recommended PHP: 7.0
10
  Tested up to: 5.4
11
+ Stable tag: 9.0.3
12
 
13
  Smarter security protection from hackers through automation. Powerful scanners, 2-Factor Auth, limit logins, auto IP blocks & more.
14
 
377
 
378
  ##### [Please review the full Shield 9.0 Upgrade Guide here](https://shsec.io/shieldupgradeguide90).
379
 
380
+ * **(.3) IMPROVED**: Scanning for SPAM email registrations is improved with more signals.
381
+ * **(.3) IMPROVED**: Better recovery from errors during certain scans.
382
+ * **(.3) IMPROVED**: WPHashes Token Retrieval.
383
+ * **(.3) FIX**: Plugins were sometimes disabled when updates applied via Scan UI.
384
+ * **(.3) FIX**: Audit Trail more correctly reflects "repair/delete" activity from the Unrecognised File Scanner.
385
+ * **(.3) FIX**: Yubikeys weren't always registered correctly.
386
+ * **(.3) FIX**: Support MemberPress Password Reset that has an Auto-Login.
387
  * **(.2) IMPROVED**: Plugin/Theme Guard only scans certain types of files based on their extension. I.e. ignoring readme.txt, for example.
388
  * **(.2) IMPROVED**: Some minor improvements to encoding special characters in the email subject/from name.
389
  * **(.2) IMPROVED**: [WPHashes.com](https://shsec.io/hs) API token update is more reliable.
src/config/feature-comments_filter.php CHANGED
@@ -285,13 +285,6 @@
285
  "min": 0,
286
  "type": "integer"
287
  },
288
- {
289
- "key": "comments_expire",
290
- "section": "section_non_ui",
291
- "default": 600,
292
- "min": 0,
293
- "type": "integer"
294
- },
295
  {
296
  "key": "human_spam_items",
297
  "section": "section_non_ui",
@@ -307,6 +300,7 @@
307
  }
308
  ],
309
  "definitions": {
 
310
  "url_spam_blacklist_terms": "https://raw.githubusercontent.com/splorp/wordpress-comment-blacklist/master/blacklist.txt",
311
  "events": {
312
  "spam_block_bot": {
285
  "min": 0,
286
  "type": "integer"
287
  },
 
 
 
 
 
 
 
288
  {
289
  "key": "human_spam_items",
290
  "section": "section_non_ui",
300
  }
301
  ],
302
  "definitions": {
303
+ "comments_expire": 1800,
304
  "url_spam_blacklist_terms": "https://raw.githubusercontent.com/splorp/wordpress-comment-blacklist/master/blacklist.txt",
305
  "events": {
306
  "spam_block_bot": {
src/config/feature-user_management.php CHANGED
@@ -204,8 +204,12 @@
204
  "text": "Email Address Syntax"
205
  },
206
  {
207
- "value_key": "domain",
208
- "text": "Domain Name Resolves"
 
 
 
 
209
  },
210
  {
211
  "value_key": "mx",
@@ -216,8 +220,8 @@
216
  "text": "Disposable Email Service"
217
  }
218
  ],
219
- "link_info": "",
220
- "link_blog": "",
221
  "name": "Email Checks",
222
  "summary": "The Email Address Properties That Will Be Tested",
223
  "description": "Select which ."
204
  "text": "Email Address Syntax"
205
  },
206
  {
207
+ "value_key": "domain_registered",
208
+ "text": "Domain Is Registered"
209
+ },
210
+ {
211
+ "value_key": "domain_resolves",
212
+ "text": "Domain Resolve To IP"
213
  },
214
  {
215
  "value_key": "mx",
220
  "text": "Disposable Email Service"
221
  }
222
  ],
223
+ "link_info": "https://shsec.io/gk",
224
+ "link_blog": "https://shsec.io/hh",
225
  "name": "Email Checks",
226
  "summary": "The Email Address Properties That Will Be Tested",
227
  "description": "Select which ."
src/features/base.php CHANGED
@@ -217,11 +217,11 @@ abstract class ICWP_WPSF_FeatureHandler_Base {
217
  return is_array( $aCls ) ? $aCls : [];
218
  }
219
 
220
- /**
221
- * Should be over-ridden by each new class to handle upgrades.
222
- * Called upon construction and after plugin options are initialized.
223
- */
224
  protected function updateHandler() {
 
 
 
 
225
  }
226
 
227
  /**
@@ -300,8 +300,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base {
300
  protected function onModulesLoaded() {
301
  }
302
 
303
- /**
304
- */
305
  public function onRunProcessors() {
306
  if ( $this->isUpgrading() ) {
307
  $this->updateHandler();
@@ -378,8 +376,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base {
378
  add_action( 'load-'.$page_hook, [ $this, 'onLoadOptionsScreen' ] );
379
  }
380
 
381
- /**
382
- */
383
  public function onLoadOptionsScreen() {
384
  if ( $this->getCon()->isValidAdminArea() ) {
385
  $this->buildContextualHelp();
@@ -1378,8 +1374,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base {
1378
  }
1379
  }
1380
 
1381
- /**
1382
- */
1383
  protected function runWizards() {
1384
  if ( $this->isWizardPage() && $this->hasWizard() ) {
1385
  $oWiz = $this->getWizardHandler();
217
  return is_array( $aCls ) ? $aCls : [];
218
  }
219
 
 
 
 
 
220
  protected function updateHandler() {
221
+ $oH = $this->loadClass( 'Upgrade' );
222
+ if ( $oH instanceof Shield\Modules\Base\Upgrade ) {
223
+ $oH->setMod( $this )->execute();
224
+ }
225
  }
226
 
227
  /**
300
  protected function onModulesLoaded() {
301
  }
302
 
 
 
303
  public function onRunProcessors() {
304
  if ( $this->isUpgrading() ) {
305
  $this->updateHandler();
376
  add_action( 'load-'.$page_hook, [ $this, 'onLoadOptionsScreen' ] );
377
  }
378
 
 
 
379
  public function onLoadOptionsScreen() {
380
  if ( $this->getCon()->isValidAdminArea() ) {
381
  $this->buildContextualHelp();
1374
  }
1375
  }
1376
 
 
 
1377
  protected function runWizards() {
1378
  if ( $this->isWizardPage() && $this->hasWizard() ) {
1379
  $oWiz = $this->getWizardHandler();
src/features/comments_filter.php CHANGED
@@ -18,7 +18,7 @@ class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_B
18
  return $oCfg;
19
  }
20
 
21
- protected function ensureCorrectCaptchaConfig() {
22
  /** @var CommentsFilter\Options $oOpts */
23
  $oOpts = $this->getOptions();
24
 
@@ -182,28 +182,6 @@ class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_B
182
  return 'CommentsFilter';
183
  }
184
 
185
- protected function updateHandler() {
186
- $oOpts = $this->getOptions();
187
-
188
- if ( $oOpts->getOpt( 'enable_google_recaptcha_comments' ) === 'N' ) {
189
- $oOpts->setOpt( 'google_recaptcha_style_comments', 'disabled' );
190
- }
191
-
192
- $aMap = [
193
- 'comments_cooldown_interval' => 'comments_cooldown',
194
- 'comments_token_expire_interval' => 'comments_expire',
195
- 'enable_comments_human_spam_filter_items' => 'human_spam_items',
196
- ];
197
- foreach ( $aMap as $sFrom => $sTo ) {
198
- $mVal = $oOpts->getOpt( $sFrom );
199
- if ( $mVal !== false ) {
200
- $oOpts->setOpt( $sTo, $mVal );
201
- }
202
- }
203
-
204
- $this->ensureCorrectCaptchaConfig();
205
- }
206
-
207
  /**
208
  * @return string
209
  */
18
  return $oCfg;
19
  }
20
 
21
+ public function ensureCorrectCaptchaConfig() {
22
  /** @var CommentsFilter\Options $oOpts */
23
  $oOpts = $this->getOptions();
24
 
182
  return 'CommentsFilter';
183
  }
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  /**
186
  * @return string
187
  */
src/features/hack_protect.php CHANGED
@@ -71,6 +71,18 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
71
  return $this->oScanQueueController;
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * @param string $sSlug
76
  * @return HackGuard\Scan\Controller\Base|mixed
@@ -112,62 +124,6 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
112
  }
113
  }
114
 
115
- protected function updateHandler() {
116
- /** @var HackGuard\Options $oOpts */
117
- $oOpts = $this->getOptions();
118
- if ( $oOpts->getOpt( 'ptg_enable' ) === 'enabled' ) {
119
- $oOpts->setOpt( 'ptg_enable', 'Y' );
120
- }
121
- elseif ( $oOpts->getOpt( 'ptg_enable' ) === 'disabled' ) {
122
- $oOpts->setOpt( 'ptg_enable', 'N' );
123
- }
124
-
125
- /**
126
- * @deprecated 9.0
127
- */
128
- {
129
- if ( $oOpts->getOpt( 'mal_scan_enable' ) === 'enabled' ) {
130
- $oOpts->setOpt( 'mal_scan_enable', 'Y' );
131
- }
132
- elseif ( $oOpts->getOpt( 'mal_scan_enable' ) === 'disabled' ) {
133
- $oOpts->setOpt( 'mal_scan_enable', 'N' );
134
- }
135
- }
136
-
137
- $aRepairAreas = $oOpts->getRepairAreas();
138
- $aMap = [
139
- 'attempt_auto_file_repair' => 'wp',
140
- 'mal_autorepair_plugins' => 'plugin',
141
- ];
142
- foreach ( $aMap as $sOld => $sNew ) {
143
- if ( $oOpts->getOpt( $sOld ) !== false ) {
144
- $bWasEnabled = $oOpts->isOpt( $sOld, 'Y' );
145
- $nIsEnabled = array_search( $sNew, $aRepairAreas );
146
- if ( $bWasEnabled && ( $nIsEnabled === false ) ) {
147
- $aRepairAreas[] = $sNew;
148
- }
149
- elseif ( !$bWasEnabled && ( $nIsEnabled !== false ) ) {
150
- unset( $aRepairAreas[ $nIsEnabled ] );
151
- }
152
- }
153
- }
154
- $this->setOpt( 'file_repair_areas', $aRepairAreas );
155
-
156
- { // migrate old scan options
157
- if ( $oOpts->getOpt( 'enable_unrecognised_file_cleaner_scan' ) == 'enabled_delete_report' ) {
158
- $oOpts->setOpt( 'enable_unrecognised_file_cleaner_scan', 'enabled_delete_only' );
159
- }
160
- $sApcOpt = $oOpts->getOpt( 'enabled_scan_apc' );
161
- if ( strlen( $sApcOpt ) > 1 ) {
162
- $oOpts->setOpt( 'enabled_scan_apc', $sApcOpt == 'disabled' ? 'N' : 'Y' );
163
- }
164
- $sWpvOpt = $oOpts->getOpt( 'enable_wpvuln_scan' );
165
- if ( strlen( $sWpvOpt ) > 1 ) {
166
- $oOpts->setOpt( 'enable_wpvuln_scan', $sWpvOpt == 'disabled' ? 'N' : 'Y' );
167
- }
168
- }
169
- }
170
-
171
  protected function preProcessOptions() {
172
  /** @var HackGuard\Options $oOpts */
173
  $oOpts = $this->getOptions();
@@ -180,11 +136,18 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
180
  $oPro->getSubProScanner()->deleteCron();
181
  }
182
 
183
- if ( count( $oOpts->getFilesToLock() ) > 0 && !$this->getCon()
184
  ->getModule_Plugin()
185
  ->getShieldNetApiController()
186
  ->canHandshake() ) {
187
  $oOpts->setOpt( 'file_locker', [] );
 
 
 
 
 
 
 
188
  }
189
  }
190
 
71
  return $this->oScanQueueController;
72
  }
73
 
74
+ /**
75
+ * @return HackGuard\Scan\Controller\Base[]
76
+ */
77
+ public function getAllScanCons() {
78
+ /** @var HackGuard\Options $oOpts */
79
+ $oOpts = $this->getOptions();
80
+ foreach ( $oOpts->getScanSlugs() as $scanSlug ) {
81
+ $this->getScanCon( $scanSlug );
82
+ }
83
+ return $this->aScanCons;
84
+ }
85
+
86
  /**
87
  * @param string $sSlug
88
  * @return HackGuard\Scan\Controller\Base|mixed
124
  }
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  protected function preProcessOptions() {
128
  /** @var HackGuard\Options $oOpts */
129
  $oOpts = $this->getOptions();
136
  $oPro->getSubProScanner()->deleteCron();
137
  }
138
 
139
+ if ( count( $oOpts->getFilesToLock() ) === 0 || !$this->getCon()
140
  ->getModule_Plugin()
141
  ->getShieldNetApiController()
142
  ->canHandshake() ) {
143
  $oOpts->setOpt( 'file_locker', [] );
144
+ $this->getFileLocker()->purge();
145
+ }
146
+
147
+ foreach ( $this->getAllScanCons() as $oCon ) {
148
+ if ( !$oCon->isEnabled() ) {
149
+ $oCon->purge();
150
+ }
151
  }
152
  }
153
 
src/features/login_protect.php CHANGED
@@ -42,11 +42,7 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
42
  $this->ensureCorrectCaptchaConfig();
43
  }
44
 
45
- protected function updateHandler() {
46
- $this->ensureCorrectCaptchaConfig();
47
- }
48
-
49
- protected function ensureCorrectCaptchaConfig() {
50
  /** @var LoginGuard\Options $oOpts */
51
  $oOpts = $this->getOptions();
52
 
42
  $this->ensureCorrectCaptchaConfig();
43
  }
44
 
45
+ public function ensureCorrectCaptchaConfig() {
 
 
 
 
46
  /** @var LoginGuard\Options $oOpts */
47
  $oOpts = $this->getOptions();
48
 
src/features/plugin.php CHANGED
@@ -100,12 +100,7 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
100
  return $aWarnings;
101
  }
102
 
103
- protected function updateHandler() {
104
- parent::updateHandler();
105
- $this->deleteAllPluginCrons();
106
- }
107
-
108
- private function deleteAllPluginCrons() {
109
  $oCon = $this->getCon();
110
  $oWpCron = Services::WpCron();
111
 
@@ -228,7 +223,11 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
228
  * @return string
229
  */
230
  public function getPluginReportEmail() {
231
- $sE = $this->getOpt( 'block_send_email_address' );
 
 
 
 
232
  return Services::Data()->validEmail( $sE ) ? $sE : Services::WpGeneral()->getSiteAdminEmail();
233
  }
234
 
100
  return $aWarnings;
101
  }
102
 
103
+ public function deleteAllPluginCrons() {
 
 
 
 
 
104
  $oCon = $this->getCon();
105
  $oWpCron = Services::WpCron();
106
 
223
  * @return string
224
  */
225
  public function getPluginReportEmail() {
226
+ $sE = (string)$this->getOpt( 'block_send_email_address' );
227
+ if ( $this->isPremium() ) {
228
+ $sE = apply_filters( $this->prefix( 'report_email' ), $sE );
229
+ }
230
+ $sE = trim( $sE );
231
  return Services::Data()->validEmail( $sE ) ? $sE : Services::WpGeneral()->getSiteAdminEmail();
232
  }
233
 
src/features/user_management.php CHANGED
@@ -55,17 +55,10 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends \ICWP_WPSF_FeatureHandler_
55
 
56
  {
57
  $aChecks = $oOpts->getEmailValidationChecks();
58
- if ( !in_array( 'syntax', $aChecks ) ) {
59
  $aChecks[] = 'syntax';
60
  }
61
- // fill in dependencies
62
- if ( in_array( 'nondisposable', $aChecks ) && !in_array( 'mx', $aChecks ) ) {
63
- $aChecks[] = 'mx';
64
- }
65
- if ( in_array( 'mx', $aChecks ) && !in_array( 'domain', $aChecks ) ) {
66
- $aChecks[] = 'domain';
67
- }
68
- $oOpts->setOpt( 'email_checks', $aChecks );
69
  }
70
  }
71
 
55
 
56
  {
57
  $aChecks = $oOpts->getEmailValidationChecks();
58
+ if ( !empty( $aChecks ) ) {
59
  $aChecks[] = 'syntax';
60
  }
61
+ $oOpts->setOpt( 'email_checks', array_unique( $aChecks ) );
 
 
 
 
 
 
 
62
  }
63
  }
64
 
src/lib/src/Controller/Controller.php CHANGED
@@ -493,6 +493,16 @@ class Controller {
493
 
494
  public function onWpLoaded() {
495
  $this->getAdminNotices();
 
 
 
 
 
 
 
 
 
 
496
  }
497
 
498
  /**
@@ -1583,6 +1593,13 @@ class Controller {
1583
  return $this->getPluginSpec_Property( 'text_domain' );
1584
  }
1585
 
 
 
 
 
 
 
 
1586
  /**
1587
  * @return string
1588
  */
493
 
494
  public function onWpLoaded() {
495
  $this->getAdminNotices();
496
+ $this->initCrons();
497
+ }
498
+
499
+ protected function initCrons() {
500
+ ( new Shield\Crons\HourlyCron() )
501
+ ->setCon( $this )
502
+ ->run();
503
+ ( new Shield\Crons\DailyCron() )
504
+ ->setCon( $this )
505
+ ->run();
506
  }
507
 
508
  /**
1593
  return $this->getPluginSpec_Property( 'text_domain' );
1594
  }
1595
 
1596
+ /**
1597
+ * @return string
1598
+ */
1599
+ public function getBuild() {
1600
+ return $this->getPluginSpec_Property( 'build' );
1601
+ }
1602
+
1603
  /**
1604
  * @return string
1605
  */
src/lib/src/Crons/BaseCron.php CHANGED
@@ -3,11 +3,12 @@
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Crons;
4
 
5
  use FernleafSystems\Wordpress\Plugin\Shield;
 
6
 
7
  abstract class BaseCron {
8
 
9
  use Shield\Crons\StandardCron;
10
- use Shield\Modules\ModConsumer;
11
 
12
  public function run() {
13
  $this->setupCron();
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Crons;
4
 
5
  use FernleafSystems\Wordpress\Plugin\Shield;
6
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
7
 
8
  abstract class BaseCron {
9
 
10
  use Shield\Crons\StandardCron;
11
+ use PluginControllerConsumer;
12
 
13
  public function run() {
14
  $this->setupCron();
src/lib/src/Crons/StandardCron.php CHANGED
@@ -61,8 +61,6 @@ trait StandardCron {
61
  return is_numeric( $nNext ) ? $nNext : 0;
62
  }
63
 
64
- /**
65
- */
66
  public function deleteCron() {
67
  Services::WpCron()->deleteCronJob( $this->getCronName() );
68
  }
@@ -72,8 +70,6 @@ trait StandardCron {
72
  $this->setupCron();
73
  }
74
 
75
- /**
76
- */
77
  public function runCron() {
78
  // Override to run the actual Cron activity
79
  }
61
  return is_numeric( $nNext ) ? $nNext : 0;
62
  }
63
 
 
 
64
  public function deleteCron() {
65
  Services::WpCron()->deleteCronJob( $this->getCronName() );
66
  }
70
  $this->setupCron();
71
  }
72
 
 
 
73
  public function runCron() {
74
  // Override to run the actual Cron activity
75
  }
src/lib/src/Deprecated/Foundation.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- namespace FernleafSystems\Wordpress\Plugin\Shield\Deprecated;
4
-
5
- class Foundation {
6
-
7
- const DEFAULT_SERVICE_PREFIX = 'icwp_wpsf_';
8
-
9
- /**
10
- * @var array
11
- */
12
- private static $aDic;
13
-
14
- /**
15
- * @param string $sSuffix
16
- * @return string
17
- */
18
- protected function prefix( $sSuffix ) {
19
- return self::DEFAULT_SERVICE_PREFIX.$sSuffix;
20
- }
21
-
22
- /**
23
- * @return array
24
- */
25
- private static function getDic() {
26
- if ( !is_array( self::$aDic ) ) {
27
- self::$aDic = [];
28
- }
29
- return self::$aDic;
30
- }
31
-
32
- /**
33
- * @param string $sService
34
- * @return mixed
35
- */
36
- private static function getService( $sService ) {
37
- $aDic = self::getDic();
38
- return $aDic[ $sService ];
39
- }
40
-
41
- /**
42
- * @param string $sService
43
- * @return bool
44
- */
45
- private static function isServiceReady( $sService ) {
46
- $aDic = self::getDic();
47
- return !empty( $aDic[ $sService ] );
48
- }
49
-
50
- /**
51
- * @param string $sServiceKey
52
- * @param mixed $oService
53
- */
54
- private static function setService( $sServiceKey, $oService ) {
55
- $aDic = self::getDic();
56
- $aDic[ $sServiceKey ] = $oService;
57
- self::$aDic = $aDic;
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/lib/src/Modules/Base/BaseProcessor.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
4
 
5
- use FernleafSystems\Wordpress\Plugin\Shield\Deprecated;
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules;
7
  use FernleafSystems\Wordpress\Services\Services;
8
 
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
4
 
 
5
  use FernleafSystems\Wordpress\Plugin\Shield\Modules;
6
  use FernleafSystems\Wordpress\Services\Services;
7
 
src/lib/src/Modules/Base/Lib/BaseService.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
4
-
5
- use FernleafSystems\Wordpress\Services\Services;
6
-
7
- class BaseService {
8
-
9
- /**
10
- * @var static
11
- */
12
- private static $oInst;
13
-
14
- /**
15
- * @return static
16
- */
17
- public static function Instance() {
18
- if ( !isset( self::$oInst ) ) {
19
- self::$oInst = new static();
20
- }
21
- return self::$oInst;
22
- }
23
-
24
- /**
25
- * BaseService constructor.
26
- */
27
- protected function __construct() {
28
- $this->start();
29
- }
30
-
31
- /**
32
- *
33
- */
34
- protected function start() {
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/lib/src/Modules/Base/Options.php CHANGED
@@ -943,7 +943,13 @@ class Options {
943
  * @return array
944
  */
945
  protected function getVirtualCommonOptions() {
946
- return [ 'dismissed_notices', 'ui_track', 'help_video_options', 'xfer_excluded' ];
 
 
 
 
 
 
947
  }
948
 
949
  /**
@@ -953,8 +959,6 @@ class Options {
953
  return is_array( $this->getOpt( 'xfer_excluded' ) ) ? $this->getOpt( 'xfer_excluded' ) : [];
954
  }
955
 
956
- /**
957
- */
958
  private function cleanOptions() {
959
  if ( !empty( $this->aOptionsValues ) && is_array( $this->aOptionsValues ) ) {
960
  $this->aOptionsValues = array_intersect_key(
943
  * @return array
944
  */
945
  protected function getVirtualCommonOptions() {
946
+ return [
947
+ 'dismissed_notices',
948
+ 'ui_track',
949
+ 'help_video_options',
950
+ 'xfer_excluded',
951
+ 'cfg_version'
952
+ ];
953
  }
954
 
955
  /**
959
  return is_array( $this->getOpt( 'xfer_excluded' ) ) ? $this->getOpt( 'xfer_excluded' ) : [];
960
  }
961
 
 
 
962
  private function cleanOptions() {
963
  if ( !empty( $this->aOptionsValues ) && is_array( $this->aOptionsValues ) ) {
964
  $this->aOptionsValues = array_intersect_key(
src/lib/src/Modules/Base/Upgrade.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
6
+
7
+ class Upgrade {
8
+
9
+ use ModConsumer;
10
+ use \FernleafSystems\Utilities\Logic\OneTimeExecute;
11
+
12
+ protected function run() {
13
+ $version = $this->getOptions()->getOpt( 'cfg_version' );
14
+ if ( empty( $version ) ) {
15
+ $version = '9.0.2'; // TODO: delete after next release is propagated
16
+ }
17
+ $this->upgradeModule( $version );
18
+ $this->runEveryUpgrade();
19
+ $this->upgradeCommon();
20
+ }
21
+
22
+ /**
23
+ * @return string[]
24
+ */
25
+ protected function getUpgrades() {
26
+ return [
27
+ '9.0.0',
28
+ '9.0.3',
29
+ ];
30
+ }
31
+
32
+ protected function runEveryUpgrade() {
33
+ }
34
+
35
+ protected function upgradeCommon() {
36
+ $this->getOptions()->setOpt( 'cfg_version', $this->getCon()->getVersion() );
37
+ $this->getMod()->saveModOptions( true );
38
+ }
39
+
40
+ /**
41
+ * @param string $sCurrent
42
+ */
43
+ protected function upgradeModule( $sCurrent ) {
44
+ foreach ( $this->getUpgrades() as $sVersion ) {
45
+ $sMethod = 'upgrade_'.str_replace( '.', '', $sVersion );
46
+ if ( version_compare( $sCurrent, $sVersion, '<' )
47
+ && method_exists( $this, $sMethod ) ) {
48
+ $this->{$sMethod}();
49
+ }
50
+ }
51
+ }
52
+ }
src/lib/src/Modules/CommentsFilter/Options.php CHANGED
@@ -37,13 +37,10 @@ class Options extends Base\ShieldOptions {
37
  * @return int
38
  */
39
  public function getTokenExpireInterval() {
40
- if ( (int)$this->getOpt( 'comments_expire', 600 ) < 1 ) {
41
- $this->resetOptToDefault( 'comments_expire' );
42
- }
43
  return (int)max( 0,
44
  apply_filters(
45
  $this->getCon()->prefix( 'comments_expire' ),
46
- $this->getOpt( 'comments_expire', 600 )
47
  )
48
  );
49
  }
37
  * @return int
38
  */
39
  public function getTokenExpireInterval() {
 
 
 
40
  return (int)max( 0,
41
  apply_filters(
42
  $this->getCon()->prefix( 'comments_expire' ),
43
+ $this->getDef( 'comments_expire' )
44
  )
45
  );
46
  }
src/lib/src/Modules/CommentsFilter/Upgrade.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\CommentsFilter;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
+
7
+ class Upgrade extends Base\Upgrade {
8
+
9
+ protected function upgrade_900() {
10
+ $oOpts = $this->getOptions();
11
+
12
+ if ( $oOpts->getOpt( 'enable_google_recaptcha_comments' ) === 'N' ) {
13
+ $oOpts->setOpt( 'google_recaptcha_style_comments', 'disabled' );
14
+ }
15
+
16
+ $aMap = [
17
+ 'comments_cooldown_interval' => 'comments_cooldown',
18
+ 'comments_token_expire_interval' => 'comments_expire',
19
+ 'enable_comments_human_spam_filter_items' => 'human_spam_items',
20
+ ];
21
+ foreach ( $aMap as $sFrom => $sTo ) {
22
+ $mVal = $oOpts->getOpt( $sFrom );
23
+ if ( $mVal !== false ) {
24
+ $oOpts->setOpt( $sTo, $mVal );
25
+ }
26
+ }
27
+ }
28
+ }
src/lib/src/Modules/HackGuard/Lib/Reports/ScanAlerts.php CHANGED
@@ -66,6 +66,7 @@ class ScanAlerts extends BaseReporter {
66
  }
67
 
68
  /**
 
69
  * @return int[] - key is scan slug
70
  */
71
  private function countItemsForEachScan() {
66
  }
67
 
68
  /**
69
+ * TODO: As class that can be used by ShieldCentral also
70
  * @return int[] - key is scan slug
71
  */
72
  private function countItemsForEachScan() {
src/lib/src/Modules/HackGuard/Upgrade.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
+
7
+ class Upgrade extends Base\Upgrade {
8
+
9
+ protected function upgrade_900() {
10
+ /** @var Options $oOpts */
11
+ $oOpts = $this->getOptions();
12
+ if ( $oOpts->getOpt( 'ptg_enable' ) === 'enabled' ) {
13
+ $oOpts->setOpt( 'ptg_enable', 'Y' );
14
+ }
15
+ elseif ( $oOpts->getOpt( 'ptg_enable' ) === 'disabled' ) {
16
+ $oOpts->setOpt( 'ptg_enable', 'N' );
17
+ }
18
+
19
+ /**
20
+ * @deprecated 9.0
21
+ */
22
+ {
23
+ if ( $oOpts->getOpt( 'mal_scan_enable' ) === 'enabled' ) {
24
+ $oOpts->setOpt( 'mal_scan_enable', 'Y' );
25
+ }
26
+ elseif ( $oOpts->getOpt( 'mal_scan_enable' ) === 'disabled' ) {
27
+ $oOpts->setOpt( 'mal_scan_enable', 'N' );
28
+ }
29
+ }
30
+
31
+ $aRepairAreas = $oOpts->getRepairAreas();
32
+ $aMap = [
33
+ 'attempt_auto_file_repair' => 'wp',
34
+ 'mal_autorepair_plugins' => 'plugin',
35
+ ];
36
+ foreach ( $aMap as $sOld => $sNew ) {
37
+ if ( $oOpts->getOpt( $sOld ) !== false ) {
38
+ $bWasEnabled = $oOpts->isOpt( $sOld, 'Y' );
39
+ $nIsEnabled = array_search( $sNew, $aRepairAreas );
40
+ if ( $bWasEnabled && ( $nIsEnabled === false ) ) {
41
+ $aRepairAreas[] = $sNew;
42
+ }
43
+ elseif ( !$bWasEnabled && ( $nIsEnabled !== false ) ) {
44
+ unset( $aRepairAreas[ $nIsEnabled ] );
45
+ }
46
+ }
47
+ }
48
+ $oOpts->setOpt( 'file_repair_areas', $aRepairAreas );
49
+
50
+ { // migrate old scan options
51
+ if ( $oOpts->getOpt( 'enable_unrecognised_file_cleaner_scan' ) == 'enabled_delete_report' ) {
52
+ $oOpts->setOpt( 'enable_unrecognised_file_cleaner_scan', 'enabled_delete_only' );
53
+ }
54
+ $sApcOpt = $oOpts->getOpt( 'enabled_scan_apc' );
55
+ if ( strlen( $sApcOpt ) > 1 ) {
56
+ $oOpts->setOpt( 'enabled_scan_apc', $sApcOpt == 'disabled' ? 'N' : 'Y' );
57
+ }
58
+ $sWpvOpt = $oOpts->getOpt( 'enable_wpvuln_scan' );
59
+ if ( strlen( $sWpvOpt ) > 1 ) {
60
+ $oOpts->setOpt( 'enable_wpvuln_scan', $sWpvOpt == 'disabled' ? 'N' : 'Y' );
61
+ }
62
+ }
63
+ }
64
+ }
src/lib/src/Modules/License/Lib/WpHashes/ApiTokenManager.php CHANGED
@@ -31,14 +31,6 @@ class ApiTokenManager {
31
  } );
32
  }
33
 
34
- /**
35
- * @return bool
36
- */
37
- public function hasToken() {
38
- $sTok = $this->getTheToken();
39
- return strlen( $sTok ) == 40 && !$this->isExpired();
40
- }
41
-
42
  /**
43
  * IMPORTANT:
44
  * To 'Pro Plugin' Nullers: Modifying this wont do your fake PRO registration any good.
@@ -53,7 +45,7 @@ class ApiTokenManager {
53
 
54
  if ( $this->getCon()->getModule_License()->getLicenseHandler()->getLicense()->isValid() ) {
55
  $aT = $this->loadToken();
56
- if ( $this->isNearlyExpired() && $this->canRequestNewToken() ) {
57
  $aT = $this->loadToken();
58
  try {
59
  $aT = array_merge( $aT, $this->solicitApiToken() );
@@ -61,6 +53,7 @@ class ApiTokenManager {
61
  catch ( \Exception $oE ) {
62
  }
63
  $aT[ 'attempt_at' ] = Services::Request()->ts();
 
64
  $this->storeToken( $aT );
65
  }
66
  }
@@ -73,21 +66,31 @@ class ApiTokenManager {
73
 
74
  /**
75
  * @return string
 
76
  */
77
  private function getTheToken() {
78
  return $this->loadToken()[ 'token' ];
79
  }
80
 
 
 
 
 
 
 
 
 
81
  /**
82
  * @return array - return Token exactly as it's saved currently
83
  */
84
  private function loadToken() {
85
  return array_merge(
86
  [
87
- 'token' => '',
88
- 'expires_at' => 0,
89
- 'attempt_at' => 0,
90
- 'valid_license' => false,
 
91
  ],
92
  $this->getOptions()->getOpt( 'wphashes_api_token', [] )
93
  );
@@ -99,7 +102,7 @@ class ApiTokenManager {
99
  private function canRequestNewToken() {
100
  return $this->getCanRequestOverride() ||
101
  (
102
- Services::Request()->carbon()->subHour( 1 )->timestamp > $this->loadToken()[ 'attempt_at' ]
103
  && $this->getCon()->getModule_License()->getLicenseHandler()->getLicense()->isValid()
104
  );
105
  }
@@ -111,18 +114,39 @@ class ApiTokenManager {
111
  return (bool)$this->bCanRequestOverride;
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  /**
115
  * @return bool
116
  */
117
  public function isExpired() {
118
- return Services::Request()->ts() > $this->loadToken()[ 'expires_at' ];
119
  }
120
 
121
  /**
122
  * @return bool
123
  */
124
  public function isNearlyExpired() {
125
- return Services::Request()->carbon()->addHours( 2 )->timestamp > $this->loadToken()[ 'expires_at' ];
126
  }
127
 
128
  /**
31
  } );
32
  }
33
 
 
 
 
 
 
 
 
 
34
  /**
35
  * IMPORTANT:
36
  * To 'Pro Plugin' Nullers: Modifying this wont do your fake PRO registration any good.
45
 
46
  if ( $this->getCon()->getModule_License()->getLicenseHandler()->getLicense()->isValid() ) {
47
  $aT = $this->loadToken();
48
+ if ( $this->isExpired() && $this->canRequestNewToken() ) {
49
  $aT = $this->loadToken();
50
  try {
51
  $aT = array_merge( $aT, $this->solicitApiToken() );
53
  catch ( \Exception $oE ) {
54
  }
55
  $aT[ 'attempt_at' ] = Services::Request()->ts();
56
+ $aT[ 'next_attempt_from' ] = Services::Request()->ts() + HOUR_IN_SECONDS;
57
  $this->storeToken( $aT );
58
  }
59
  }
66
 
67
  /**
68
  * @return string
69
+ * @deprecated 9.0.3
70
  */
71
  private function getTheToken() {
72
  return $this->loadToken()[ 'token' ];
73
  }
74
 
75
+ /**
76
+ * @return bool
77
+ */
78
+ public function hasToken() {
79
+ $sTok = $this->getToken();
80
+ return strlen( $sTok ) == 40 && !$this->isExpired();
81
+ }
82
+
83
  /**
84
  * @return array - return Token exactly as it's saved currently
85
  */
86
  private function loadToken() {
87
  return array_merge(
88
  [
89
+ 'token' => '',
90
+ 'expires_at' => 0,
91
+ 'attempt_at' => 0,
92
+ 'next_attempt_from' => 0,
93
+ 'valid_license' => false,
94
  ],
95
  $this->getOptions()->getOpt( 'wphashes_api_token', [] )
96
  );
102
  private function canRequestNewToken() {
103
  return $this->getCanRequestOverride() ||
104
  (
105
+ Services::Request()->ts() >= $this->getNextAttemptAllowedFrom()
106
  && $this->getCon()->getModule_License()->getLicenseHandler()->getLicense()->isValid()
107
  );
108
  }
114
  return (bool)$this->bCanRequestOverride;
115
  }
116
 
117
+ /**
118
+ * @return int
119
+ */
120
+ public function getExpiresAt() {
121
+ return $this->loadToken()[ 'expires_at' ];
122
+ }
123
+
124
+ /**
125
+ * @return int
126
+ */
127
+ public function getNextAttemptAllowedFrom() {
128
+ return $this->loadToken()[ 'next_attempt_from' ];
129
+ }
130
+
131
+ /**
132
+ * @return int
133
+ */
134
+ public function getPreviousAttemptAt() {
135
+ return $this->loadToken()[ 'attempt_at' ];
136
+ }
137
+
138
  /**
139
  * @return bool
140
  */
141
  public function isExpired() {
142
+ return Services::Request()->ts() > $this->getExpiresAt();
143
  }
144
 
145
  /**
146
  * @return bool
147
  */
148
  public function isNearlyExpired() {
149
+ return Services::Request()->carbon()->addHours( 2 )->timestamp > $this->getExpiresAt();
150
  }
151
 
152
  /**
src/lib/src/Modules/LoginGuard/Lib/AntiBot/FormProviders/MemberPress.php CHANGED
@@ -7,6 +7,12 @@ class MemberPress extends BaseFormProvider {
7
  protected function login() {
8
  add_action( 'mepr-login-form-before-submit', [ $this, 'formInsertsPrint' ], 100 );
9
  add_filter( 'mepr-validate-login', [ $this, 'checkLogin' ], 100 );
 
 
 
 
 
 
10
  }
11
 
12
  protected function register() {
@@ -41,6 +47,7 @@ class MemberPress extends BaseFormProvider {
41
  * @return array
42
  */
43
  public function checkLostPassword( $aErrors ) {
 
44
  if ( !empty( $aErrors ) ) {
45
  try {
46
  $this->setActionToAudit( 'memberpress-lostpassword' )
7
  protected function login() {
8
  add_action( 'mepr-login-form-before-submit', [ $this, 'formInsertsPrint' ], 100 );
9
  add_filter( 'mepr-validate-login', [ $this, 'checkLogin' ], 100 );
10
+ /**
11
+ * We have to add a checkbox to the password reset form because MemberPress attempts to
12
+ * login the given user upon success of password update. Without this checkbox being present
13
+ * the login will fail (though the password update will not).
14
+ */
15
+ add_action( 'mepr-reset-password-after-password-fields', [ $this, 'formInsertsPrint' ], 100 );
16
  }
17
 
18
  protected function register() {
47
  * @return array
48
  */
49
  public function checkLostPassword( $aErrors ) {
50
+ error_log( __FUNCTION__ );
51
  if ( !empty( $aErrors ) ) {
52
  try {
53
  $this->setActionToAudit( 'memberpress-lostpassword' )
src/lib/src/Modules/LoginGuard/Lib/TwoFactor/Provider/Yubikey.php CHANGED
@@ -120,7 +120,7 @@ class Yubikey extends BaseProvider {
120
  * @return array
121
  */
122
  private function getYubiIds( \WP_User $oUser ) {
123
- return explode( ',', $this->getSecret( $oUser ) );
124
  }
125
 
126
  /**
120
  * @return array
121
  */
122
  private function getYubiIds( \WP_User $oUser ) {
123
+ return array_filter( array_map( 'trim', explode( ',', $this->getSecret( $oUser ) ) ) );
124
  }
125
 
126
  /**
src/lib/src/Modules/LoginGuard/Upgrade.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\LoginGuard;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
+
7
+ class Upgrade extends Base\Upgrade {
8
+
9
+ }
src/lib/src/Modules/Plugin/Lib/Debug/Collate.php CHANGED
@@ -172,11 +172,23 @@ class Collate {
172
  $oCon = $this->getCon();
173
  $oModLicense = $oCon->getModule_License();
174
  $oModPlugin = $oCon->getModule_Plugin();
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
  $aD = [
177
  'Version' => $oCon->getVersion(),
178
  'PRO' => $oCon->isPremiumActive() ? 'Yes' : 'No',
179
- 'WP Hashes Token' => $oModLicense->getWpHashesTokenManager()->hasToken() ? 'Yes' : 'No',
180
  'Security Admin Enabled' => $oCon->getModule_SecAdmin()->isEnabledSecurityAdmin() ? 'Yes' : 'No',
181
  ];
182
 
172
  $oCon = $this->getCon();
173
  $oModLicense = $oCon->getModule_License();
174
  $oModPlugin = $oCon->getModule_Plugin();
175
+ $oWpHashes = $oModLicense->getWpHashesTokenManager();
176
+
177
+ $nPrevAttempt = $oWpHashes->getPreviousAttemptAt();
178
+ if ( empty( $nPrevAttempt ) ) {
179
+ $sPrev = 'Never';
180
+ }
181
+ else {
182
+ $sPrev = 'Last Attempt: '.Services::Request()
183
+ ->carbon()
184
+ ->setTimestamp( $nPrevAttempt )
185
+ ->diffForHumans();
186
+ }
187
 
188
  $aD = [
189
  'Version' => $oCon->getVersion(),
190
  'PRO' => $oCon->isPremiumActive() ? 'Yes' : 'No',
191
+ 'WP Hashes Token' => ( $oWpHashes->hasToken() ? $oWpHashes->getToken() : '' ).' ('.$sPrev.')',
192
  'Security Admin Enabled' => $oCon->getModule_SecAdmin()->isEnabledSecurityAdmin() ? 'Yes' : 'No',
193
  ];
194
 
src/lib/src/Modules/Plugin/Upgrade.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
+
7
+ class Upgrade extends Base\Upgrade {
8
+
9
+ protected function runEveryUpgrade() {
10
+ /** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
11
+ $oMod = $this->getMod();
12
+ $oMod->deleteAllPluginCrons();
13
+ }
14
+ }
src/lib/src/Modules/UserManagement/Lib/Registration/EmailValidate.php CHANGED
@@ -48,10 +48,13 @@ class EmailValidate {
48
  ->getToken();
49
  if ( !empty( $sApiToken ) ) {
50
  $aChecks = $oOpts->getEmailValidationChecks();
51
- foreach ( ( new Email( $sApiToken ) )->getEmailVerification( $sEmail ) as $sValidation => $bIsValid ) {
52
- if ( !$bIsValid && in_array( $sValidation, $aChecks ) ) {
53
- $sInvalidBecause = $sValidation;
54
- break;
 
 
 
55
  }
56
  }
57
  }
48
  ->getToken();
49
  if ( !empty( $sApiToken ) ) {
50
  $aChecks = $oOpts->getEmailValidationChecks();
51
+ $aVerifys = ( new Email( $sApiToken ) )->getEmailVerification( $sEmail );
52
+ if ( is_array( $aVerifys ) ) {
53
+ foreach ( $aVerifys as $sVerifyKey => $bIsValid ) {
54
+ if ( !$bIsValid && in_array( $sVerifyKey, $aChecks ) ) {
55
+ $sInvalidBecause = $sVerifyKey;
56
+ break;
57
+ }
58
  }
59
  }
60
  }
src/lib/src/Modules/UserManagement/Strings.php CHANGED
@@ -162,7 +162,10 @@ class Strings extends Base\Strings {
162
  case 'reg_email_validate' :
163
  $sName = __( 'Validate Email Addresses', 'wp-simple-firewall' );
164
  $sSummary = __( 'Validate Email Addresses When User Attempts To Register', 'wp-simple-firewall' );
165
- $sDesc = __( 'Validate Email Addresses When User Attempts To Register.', 'wp-simple-firewall' );
 
 
 
166
  break;
167
 
168
  case 'email_checks' :
162
  case 'reg_email_validate' :
163
  $sName = __( 'Validate Email Addresses', 'wp-simple-firewall' );
164
  $sSummary = __( 'Validate Email Addresses When User Attempts To Register', 'wp-simple-firewall' );
165
+ $sDesc = [
166
+ __( 'Validate Email Addresses When User Attempts To Register.', 'wp-simple-firewall' ),
167
+ __( 'To validate an email your site sends a request to the WPHashes API and may cause a small delay during the user registration request.', 'wp-simple-firewall' ),
168
+ ];
169
  break;
170
 
171
  case 'email_checks' :
src/lib/src/Modules/UserManagement/Upgrade.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\UserManagement;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
6
+
7
+ class Upgrade extends Base\Upgrade {
8
+
9
+ protected function upgrade_903() {
10
+ /** @var Options $oOpts */
11
+ $oOpts = $this->getOptions();
12
+ $aChecks = $oOpts->getEmailValidationChecks();
13
+ if ( in_array( 'domain', $aChecks ) ) {
14
+ $aChecks[] = 'domain_registered';
15
+ unset( $aChecks[ array_search( 'domain', $aChecks ) ] );
16
+ $oOpts->setOpt( 'email_checks', $aChecks );
17
+ }
18
+ }
19
+ }
src/lib/src/Scans/Base/Utilities/ItemActionHandler.php CHANGED
@@ -40,6 +40,7 @@ abstract class ItemActionHandler {
40
  }
41
 
42
  /**
 
43
  * @return bool
44
  * @throws \Exception
45
  */
@@ -72,15 +73,18 @@ abstract class ItemActionHandler {
72
  }
73
 
74
  /**
 
75
  * @return bool
76
  * @throws \Exception
77
  */
78
- public function repair() {
79
  $oRep = $this->getRepairer();
80
  if ( !$oRep->canRepair() ) {
81
  throw new \Exception( 'This item cannot be automatically repaired.' );
82
  }
83
 
 
 
84
  $oItem = $this->getScanItem();
85
  $oItem->repaired = $oRep->repairItem();
86
  $this->fireRepairEvent( $oItem->repaired );
40
  }
41
 
42
  /**
43
+ * TODO: Determine if "delete" is always the same as a "repair" - see UFC override
44
  * @return bool
45
  * @throws \Exception
46
  */
73
  }
74
 
75
  /**
76
+ * @param bool $bAllowDelete
77
  * @return bool
78
  * @throws \Exception
79
  */
80
+ public function repair( $bAllowDelete = false ) {
81
  $oRep = $this->getRepairer();
82
  if ( !$oRep->canRepair() ) {
83
  throw new \Exception( 'This item cannot be automatically repaired.' );
84
  }
85
 
86
+ $oRep->setAllowDelete( $bAllowDelete );
87
+
88
  $oItem = $this->getScanItem();
89
  $oItem->repaired = $oRep->repairItem();
90
  $this->fireRepairEvent( $oItem->repaired );
src/lib/src/Scans/Mal/BuildFileMap.php CHANGED
@@ -25,19 +25,22 @@ class BuildFileMap {
25
 
26
  foreach ( $oAction->scan_root_dirs as $sScanDir => $nDepth ) {
27
  try {
28
- $oDirIt = StandardDirectoryIterator::create( $sScanDir, (int)$nDepth, $oAction->file_exts, false );
29
- foreach ( $oDirIt as $oFsItem ) {
30
- $sFullPath = wp_normalize_path( $oFsItem->getPathname() );
31
  /** @var \SplFileInfo $oFsItem */
32
- if ( $this->isWhitelistedPath( $sFullPath ) || $oFsItem->getSize() == 0 ) {
33
- continue;
 
 
 
 
 
34
  }
35
- $aFiles[] = $sFullPath;
36
  }
37
  }
38
  catch ( \Exception $oE ) {
39
  error_log(
40
- sprintf( 'Shield file scanner attempted to read directory (%s) but there was error: "%s".', $sScanDir, $oE->getMessage() )
 
41
  );
42
  }
43
  }
25
 
26
  foreach ( $oAction->scan_root_dirs as $sScanDir => $nDepth ) {
27
  try {
28
+ foreach ( StandardDirectoryIterator::create( $sScanDir, (int)$nDepth, $oAction->file_exts, false ) as $oFsItem ) {
 
 
29
  /** @var \SplFileInfo $oFsItem */
30
+ $sFullPath = wp_normalize_path( $oFsItem->getPathname() );
31
+ try {
32
+ if ( !$this->isWhitelistedPath( $sFullPath ) && $oFsItem->getSize() > 0 ) {
33
+ $aFiles[] = $sFullPath;
34
+ }
35
+ }
36
+ catch ( \Exception $oE ) {
37
  }
 
38
  }
39
  }
40
  catch ( \Exception $oE ) {
41
  error_log(
42
+ sprintf( 'Shield file scanner (%s) attempted to read directory (%s) but there was error: "%s".',
43
+ $oAction->scan, $sScanDir, $oE->getMessage() )
44
  );
45
  }
46
  }
src/lib/src/Scans/Ptg/BuildFileMap.php CHANGED
@@ -20,23 +20,27 @@ class BuildFileMap {
20
  public function build() {
21
  $aFiles = [];
22
 
23
- /** @var ScanActionVO $oScanAction */
24
- $oScanAction = $this->getScanActionVO();
25
 
26
  $sAbsPath = wp_normalize_path( ABSPATH );
27
- foreach ( $this->getScanRoots() as $sRootDir ) {
28
  try {
29
- $oDirIt = StandardDirectoryIterator::create( $sRootDir, 0, $oScanAction->file_exts );
30
- foreach ( $oDirIt as $oFsItem ) {
31
  /** @var \SplFileInfo $oFsItem */
32
- if ( $oFsItem->getSize() != 0 ) {
33
- $aFiles[] = str_replace( $sAbsPath, '', wp_normalize_path( $oFsItem->getPathname() ) );
 
 
 
 
34
  }
35
  }
36
  }
37
  catch ( \Exception $oE ) {
38
  error_log(
39
- sprintf( 'Shield file scanner attempted to read directory (%s) but there was error: "%s".', $sRootDir, $oE->getMessage() )
 
40
  );
41
  }
42
  }
20
  public function build() {
21
  $aFiles = [];
22
 
23
+ /** @var ScanActionVO $oAction */
24
+ $oAction = $this->getScanActionVO();
25
 
26
  $sAbsPath = wp_normalize_path( ABSPATH );
27
+ foreach ( $this->getScanRoots() as $sScanDir ) {
28
  try {
29
+ foreach ( StandardDirectoryIterator::create( $sScanDir, 0, $oAction->file_exts ) as $oFsItem ) {
 
30
  /** @var \SplFileInfo $oFsItem */
31
+ try {
32
+ if ( $oFsItem->getSize() > 0 ) {
33
+ $aFiles[] = str_replace( $sAbsPath, '', wp_normalize_path( $oFsItem->getPathname() ) );
34
+ }
35
+ }
36
+ catch ( \Exception $oE ) {
37
  }
38
  }
39
  }
40
  catch ( \Exception $oE ) {
41
  error_log(
42
+ sprintf( 'Shield file scanner (%s) attempted to read directory (%s) but there was error: "%s".',
43
+ $oAction->scan, $sScanDir, $oE->getMessage() )
44
  );
45
  }
46
  }
src/lib/src/Scans/Ufc/BuildFileMap.php CHANGED
@@ -27,7 +27,7 @@ class BuildFileMap {
27
  /** @var ScanActionVO $oAction */
28
  $oAction = $this->getScanActionVO();
29
 
30
- foreach ( $oAction->scan_dirs as $sDir => $aFileExts ) {
31
  try {
32
  /**
33
  * The filter handles the bulk of the file inclusions and exclusions
@@ -36,9 +36,7 @@ class BuildFileMap {
36
  * The filter will also be responsible (in this case) for filtering out
37
  * WP Core files from the collection of files to be assessed
38
  */
39
- $oDirIt = StandardDirectoryIterator::create( $sDir, 0, $aFileExts, true );
40
-
41
- foreach ( $oDirIt as $oFsItem ) {
42
  /** @var \SplFileInfo $oFsItem */
43
  $sFullPath = $oFsItem->getPathname();
44
  if ( !$oHashes->isCoreFile( $sFullPath ) ) {
@@ -48,7 +46,8 @@ class BuildFileMap {
48
  }
49
  catch ( \Exception $oE ) {
50
  error_log(
51
- sprintf( 'Shield file scanner attempted to read directory but there was error: "%s".', $oE->getMessage() )
 
52
  );
53
  }
54
  }
27
  /** @var ScanActionVO $oAction */
28
  $oAction = $this->getScanActionVO();
29
 
30
+ foreach ( $oAction->scan_dirs as $sScanDir => $aFileExts ) {
31
  try {
32
  /**
33
  * The filter handles the bulk of the file inclusions and exclusions
36
  * The filter will also be responsible (in this case) for filtering out
37
  * WP Core files from the collection of files to be assessed
38
  */
39
+ foreach ( StandardDirectoryIterator::create( $sScanDir, 0, $aFileExts, true ) as $oFsItem ) {
 
 
40
  /** @var \SplFileInfo $oFsItem */
41
  $sFullPath = $oFsItem->getPathname();
42
  if ( !$oHashes->isCoreFile( $sFullPath ) ) {
46
  }
47
  catch ( \Exception $oE ) {
48
  error_log(
49
+ sprintf( 'Shield file scanner (%s) attempted to read directory (%s) but there was error: "%s".',
50
+ $oAction->scan, $sScanDir, $oE->getMessage() )
51
  );
52
  }
53
  }
src/lib/src/Scans/Ufc/Utilities/ItemActionHandler.php CHANGED
@@ -7,6 +7,13 @@ use FernleafSystems\Wordpress\Plugin\Shield\Scans\Ufc;
7
 
8
  class ItemActionHandler extends Base\Utilities\ItemActionHandler {
9
 
 
 
 
 
 
 
 
10
  /**
11
  * @return Repair
12
  */
7
 
8
  class ItemActionHandler extends Base\Utilities\ItemActionHandler {
9
 
10
+ /**
11
+ * @inheritDoc
12
+ */
13
+ public function delete() {
14
+ return $this->repair( true );
15
+ }
16
+
17
  /**
18
  * @return Repair
19
  */
src/lib/src/ShieldNetApi/ShieldNetApiController.php CHANGED
@@ -57,9 +57,8 @@ class ShieldNetApiController {
57
  }
58
 
59
  public function storeVoData() {
60
- $oMod = $this->getMod();
61
- $oMod->getOptions()->setOpt( 'snapi_data', $this->vo->getRawDataAsArray() );
62
- $oMod->saveModOptions();
63
  }
64
 
65
  /**
57
  }
58
 
59
  public function storeVoData() {
60
+ $this->getOptions()->setOpt( 'snapi_data', $this->vo->getRawDataAsArray() );
61
+ $this->getMod()->saveModOptions();
 
62
  }
63
 
64
  /**
src/lib/src/Utilities/Options/CleanStorage.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Utilities\Options;
4
+
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
6
+
7
+ class CleanStorage {
8
+
9
+ use PluginControllerConsumer;
10
+
11
+ public function run() {
12
+ foreach ( $this->getCon()->modules as $oMod ) {
13
+ $oOpts = $oMod->getOptions();
14
+ foreach ( array_keys( $oOpts->getAllOptionsValues() ) as $sOptKey ) {
15
+ if ( !$oOpts->isValidOptionKey( $sOptKey ) ) {
16
+ $oOpts->unsetOpt( $sOptKey );
17
+ }
18
+ }
19
+ $oMod->saveModOptions();
20
+ }
21
+ }
22
+ }
src/lib/vendor/composer/autoload_classmap.php CHANGED
@@ -177,6 +177,7 @@ return array(
177
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => $baseDir . '/src/Modules/Base/Options.php',
178
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => $baseDir . '/src/Modules/Base/ShieldOptions.php',
179
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Strings' => $baseDir . '/src/Modules/Base/Strings.php',
 
180
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AdminNotices' => $baseDir . '/src/Modules/CommentsFilter/AdminNotices.php',
181
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AjaxHandler' => $baseDir . '/src/Modules/CommentsFilter/AjaxHandler.php',
182
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Options' => $baseDir . '/src/Modules/CommentsFilter/Options.php',
@@ -186,6 +187,7 @@ return array(
186
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Scan\\Scanner' => $baseDir . '/src/Modules/CommentsFilter/Scan/Scanner.php',
187
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Strings' => $baseDir . '/src/Modules/CommentsFilter/Strings.php',
188
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Token\\Create' => $baseDir . '/src/Modules/CommentsFilter/Token/Create.php',
 
189
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Options' => $baseDir . '/src/Modules/Email/Options.php',
190
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Strings' => $baseDir . '/src/Modules/Email/Strings.php',
191
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Events\\AjaxHandler' => $baseDir . '/src/Modules/Events/AjaxHandler.php',
@@ -266,6 +268,7 @@ return array(
266
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
267
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => $baseDir . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
268
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => $baseDir . '/src/Modules/HackGuard/Strings.php',
 
269
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => $baseDir . '/src/Modules/Headers/Options.php',
270
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => $baseDir . '/src/Modules/Headers/Strings.php',
271
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\IPs\\AdminNotices' => $baseDir . '/src/Modules/IPs/AdminNotices.php',
@@ -341,6 +344,7 @@ return array(
341
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Lib\\TwoFactor\\ValidateLoginIntentRequest' => $baseDir . '/src/Modules/LoginGuard/Lib/TwoFactor/ValidateLoginIntentRequest.php',
342
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Options' => $baseDir . '/src/Modules/LoginGuard/Options.php',
343
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Strings' => $baseDir . '/src/Modules/LoginGuard/Strings.php',
 
344
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\ModConsumer' => $baseDir . '/src/Modules/ModConsumer.php',
345
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\OptsConsumer' => $baseDir . '/src/Modules/OptsConsumer.php',
346
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\PluginControllerConsumer' => $baseDir . '/src/Modules/PluginControllerConsumer.php',
@@ -362,6 +366,7 @@ return array(
362
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Lib\\TourManager' => $baseDir . '/src/Modules/Plugin/Lib/TourManager.php',
363
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Options' => $baseDir . '/src/Modules/Plugin/Options.php',
364
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Strings' => $baseDir . '/src/Modules/Plugin/Strings.php',
 
365
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\ReportingController' => $baseDir . '/src/Modules/Reporting/Lib/ReportingController.php',
366
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\BaseReporter' => $baseDir . '/src/Modules/Reporting/Lib/Reports/BaseReporter.php',
367
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\Build\\BaseBuilder' => $baseDir . '/src/Modules/Reporting/Lib/Reports/Build/BaseBuilder.php',
@@ -399,6 +404,7 @@ return array(
399
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\PasswordExpiry' => $baseDir . '/src/Modules/UserManagement/Suspend/PasswordExpiry.php',
400
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => $baseDir . '/src/Modules/UserManagement/Suspend/Suspended.php',
401
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => $baseDir . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
 
402
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => $baseDir . '/src/Scans/Apc/BuildScanAction.php',
403
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => $baseDir . '/src/Scans/Apc/ConvertVosToResults.php',
404
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => $baseDir . '/src/Scans/Apc/PluginScanner.php',
@@ -534,6 +540,7 @@ return array(
534
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\Controller' => $baseDir . '/src/Utilities/AdminNotices/Controller.php',
535
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\NoticeVO' => $baseDir . '/src/Utilities/AdminNotices/NoticeVO.php',
536
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\HCaptcha\\TestRequest' => $baseDir . '/src/Utilities/HCaptcha/TestRequest.php',
 
537
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\Enqueue' => $baseDir . '/src/Utilities/ReCaptcha/Enqueue.php',
538
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\TestRequest' => $baseDir . '/src/Utilities/ReCaptcha/TestRequest.php',
539
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\WordpressPost' => $baseDir . '/src/Utilities/ReCaptcha/WordpressPost.php',
177
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => $baseDir . '/src/Modules/Base/Options.php',
178
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => $baseDir . '/src/Modules/Base/ShieldOptions.php',
179
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Strings' => $baseDir . '/src/Modules/Base/Strings.php',
180
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Upgrade' => $baseDir . '/src/Modules/Base/Upgrade.php',
181
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AdminNotices' => $baseDir . '/src/Modules/CommentsFilter/AdminNotices.php',
182
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AjaxHandler' => $baseDir . '/src/Modules/CommentsFilter/AjaxHandler.php',
183
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Options' => $baseDir . '/src/Modules/CommentsFilter/Options.php',
187
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Scan\\Scanner' => $baseDir . '/src/Modules/CommentsFilter/Scan/Scanner.php',
188
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Strings' => $baseDir . '/src/Modules/CommentsFilter/Strings.php',
189
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Token\\Create' => $baseDir . '/src/Modules/CommentsFilter/Token/Create.php',
190
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Upgrade' => $baseDir . '/src/Modules/CommentsFilter/Upgrade.php',
191
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Options' => $baseDir . '/src/Modules/Email/Options.php',
192
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Strings' => $baseDir . '/src/Modules/Email/Strings.php',
193
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Events\\AjaxHandler' => $baseDir . '/src/Modules/Events/AjaxHandler.php',
268
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
269
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => $baseDir . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
270
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => $baseDir . '/src/Modules/HackGuard/Strings.php',
271
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Upgrade' => $baseDir . '/src/Modules/HackGuard/Upgrade.php',
272
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => $baseDir . '/src/Modules/Headers/Options.php',
273
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => $baseDir . '/src/Modules/Headers/Strings.php',
274
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\IPs\\AdminNotices' => $baseDir . '/src/Modules/IPs/AdminNotices.php',
344
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Lib\\TwoFactor\\ValidateLoginIntentRequest' => $baseDir . '/src/Modules/LoginGuard/Lib/TwoFactor/ValidateLoginIntentRequest.php',
345
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Options' => $baseDir . '/src/Modules/LoginGuard/Options.php',
346
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Strings' => $baseDir . '/src/Modules/LoginGuard/Strings.php',
347
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Upgrade' => $baseDir . '/src/Modules/LoginGuard/Upgrade.php',
348
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\ModConsumer' => $baseDir . '/src/Modules/ModConsumer.php',
349
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\OptsConsumer' => $baseDir . '/src/Modules/OptsConsumer.php',
350
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\PluginControllerConsumer' => $baseDir . '/src/Modules/PluginControllerConsumer.php',
366
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Lib\\TourManager' => $baseDir . '/src/Modules/Plugin/Lib/TourManager.php',
367
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Options' => $baseDir . '/src/Modules/Plugin/Options.php',
368
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Strings' => $baseDir . '/src/Modules/Plugin/Strings.php',
369
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Upgrade' => $baseDir . '/src/Modules/Plugin/Upgrade.php',
370
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\ReportingController' => $baseDir . '/src/Modules/Reporting/Lib/ReportingController.php',
371
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\BaseReporter' => $baseDir . '/src/Modules/Reporting/Lib/Reports/BaseReporter.php',
372
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\Build\\BaseBuilder' => $baseDir . '/src/Modules/Reporting/Lib/Reports/Build/BaseBuilder.php',
404
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\PasswordExpiry' => $baseDir . '/src/Modules/UserManagement/Suspend/PasswordExpiry.php',
405
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => $baseDir . '/src/Modules/UserManagement/Suspend/Suspended.php',
406
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => $baseDir . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
407
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Upgrade' => $baseDir . '/src/Modules/UserManagement/Upgrade.php',
408
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => $baseDir . '/src/Scans/Apc/BuildScanAction.php',
409
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => $baseDir . '/src/Scans/Apc/ConvertVosToResults.php',
410
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => $baseDir . '/src/Scans/Apc/PluginScanner.php',
540
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\Controller' => $baseDir . '/src/Utilities/AdminNotices/Controller.php',
541
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\NoticeVO' => $baseDir . '/src/Utilities/AdminNotices/NoticeVO.php',
542
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\HCaptcha\\TestRequest' => $baseDir . '/src/Utilities/HCaptcha/TestRequest.php',
543
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\Options\\CleanStorage' => $baseDir . '/src/Utilities/Options/CleanStorage.php',
544
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\Enqueue' => $baseDir . '/src/Utilities/ReCaptcha/Enqueue.php',
545
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\TestRequest' => $baseDir . '/src/Utilities/ReCaptcha/TestRequest.php',
546
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\WordpressPost' => $baseDir . '/src/Utilities/ReCaptcha/WordpressPost.php',
src/lib/vendor/composer/autoload_static.php CHANGED
@@ -332,6 +332,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
332
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => __DIR__ . '/../..' . '/src/Modules/Base/Options.php',
333
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => __DIR__ . '/../..' . '/src/Modules/Base/ShieldOptions.php',
334
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Strings' => __DIR__ . '/../..' . '/src/Modules/Base/Strings.php',
 
335
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AdminNotices' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/AdminNotices.php',
336
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/AjaxHandler.php',
337
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Options' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Options.php',
@@ -341,6 +342,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
341
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Scan\\Scanner' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Scan/Scanner.php',
342
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Strings' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Strings.php',
343
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Token\\Create' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Token/Create.php',
 
344
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Options' => __DIR__ . '/../..' . '/src/Modules/Email/Options.php',
345
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Strings' => __DIR__ . '/../..' . '/src/Modules/Email/Strings.php',
346
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Events\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/Events/AjaxHandler.php',
@@ -421,6 +423,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
421
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
422
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
423
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Strings.php',
 
424
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => __DIR__ . '/../..' . '/src/Modules/Headers/Options.php',
425
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => __DIR__ . '/../..' . '/src/Modules/Headers/Strings.php',
426
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\IPs\\AdminNotices' => __DIR__ . '/../..' . '/src/Modules/IPs/AdminNotices.php',
@@ -496,6 +499,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
496
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Lib\\TwoFactor\\ValidateLoginIntentRequest' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Lib/TwoFactor/ValidateLoginIntentRequest.php',
497
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Options' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Options.php',
498
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Strings.php',
 
499
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\ModConsumer' => __DIR__ . '/../..' . '/src/Modules/ModConsumer.php',
500
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\OptsConsumer' => __DIR__ . '/../..' . '/src/Modules/OptsConsumer.php',
501
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\PluginControllerConsumer' => __DIR__ . '/../..' . '/src/Modules/PluginControllerConsumer.php',
@@ -517,6 +521,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
517
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Lib\\TourManager' => __DIR__ . '/../..' . '/src/Modules/Plugin/Lib/TourManager.php',
518
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Options' => __DIR__ . '/../..' . '/src/Modules/Plugin/Options.php',
519
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Strings' => __DIR__ . '/../..' . '/src/Modules/Plugin/Strings.php',
 
520
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\ReportingController' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/ReportingController.php',
521
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\BaseReporter' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/Reports/BaseReporter.php',
522
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\Build\\BaseBuilder' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/Reports/Build/BaseBuilder.php',
@@ -554,6 +559,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
554
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\PasswordExpiry' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/PasswordExpiry.php',
555
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/Suspended.php',
556
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => __DIR__ . '/../..' . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
 
557
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Apc/BuildScanAction.php',
558
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Apc/ConvertVosToResults.php',
559
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => __DIR__ . '/../..' . '/src/Scans/Apc/PluginScanner.php',
@@ -689,6 +695,7 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
689
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\Controller' => __DIR__ . '/../..' . '/src/Utilities/AdminNotices/Controller.php',
690
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\NoticeVO' => __DIR__ . '/../..' . '/src/Utilities/AdminNotices/NoticeVO.php',
691
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\HCaptcha\\TestRequest' => __DIR__ . '/../..' . '/src/Utilities/HCaptcha/TestRequest.php',
 
692
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\Enqueue' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/Enqueue.php',
693
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\TestRequest' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/TestRequest.php',
694
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\WordpressPost' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/WordpressPost.php',
332
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Options' => __DIR__ . '/../..' . '/src/Modules/Base/Options.php',
333
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\ShieldOptions' => __DIR__ . '/../..' . '/src/Modules/Base/ShieldOptions.php',
334
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Strings' => __DIR__ . '/../..' . '/src/Modules/Base/Strings.php',
335
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Base\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/Base/Upgrade.php',
336
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AdminNotices' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/AdminNotices.php',
337
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/AjaxHandler.php',
338
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Options' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Options.php',
342
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Scan\\Scanner' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Scan/Scanner.php',
343
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Strings' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Strings.php',
344
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Token\\Create' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Token/Create.php',
345
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\CommentsFilter\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/CommentsFilter/Upgrade.php',
346
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Options' => __DIR__ . '/../..' . '/src/Modules/Email/Options.php',
347
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Email\\Strings' => __DIR__ . '/../..' . '/src/Modules/Email/Strings.php',
348
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Events\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/Events/AjaxHandler.php',
423
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
424
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
425
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Strings.php',
426
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Upgrade.php',
427
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => __DIR__ . '/../..' . '/src/Modules/Headers/Options.php',
428
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => __DIR__ . '/../..' . '/src/Modules/Headers/Strings.php',
429
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\IPs\\AdminNotices' => __DIR__ . '/../..' . '/src/Modules/IPs/AdminNotices.php',
499
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Lib\\TwoFactor\\ValidateLoginIntentRequest' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Lib/TwoFactor/ValidateLoginIntentRequest.php',
500
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Options' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Options.php',
501
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Strings.php',
502
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\LoginGuard\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/LoginGuard/Upgrade.php',
503
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\ModConsumer' => __DIR__ . '/../..' . '/src/Modules/ModConsumer.php',
504
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\OptsConsumer' => __DIR__ . '/../..' . '/src/Modules/OptsConsumer.php',
505
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\PluginControllerConsumer' => __DIR__ . '/../..' . '/src/Modules/PluginControllerConsumer.php',
521
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Lib\\TourManager' => __DIR__ . '/../..' . '/src/Modules/Plugin/Lib/TourManager.php',
522
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Options' => __DIR__ . '/../..' . '/src/Modules/Plugin/Options.php',
523
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Strings' => __DIR__ . '/../..' . '/src/Modules/Plugin/Strings.php',
524
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Plugin\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/Plugin/Upgrade.php',
525
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\ReportingController' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/ReportingController.php',
526
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\BaseReporter' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/Reports/BaseReporter.php',
527
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Reporting\\Lib\\Reports\\Build\\BaseBuilder' => __DIR__ . '/../..' . '/src/Modules/Reporting/Lib/Reports/Build/BaseBuilder.php',
559
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\PasswordExpiry' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/PasswordExpiry.php',
560
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/Suspended.php',
561
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => __DIR__ . '/../..' . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
562
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Upgrade' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Upgrade.php',
563
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Apc/BuildScanAction.php',
564
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Apc/ConvertVosToResults.php',
565
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => __DIR__ . '/../..' . '/src/Scans/Apc/PluginScanner.php',
695
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\Controller' => __DIR__ . '/../..' . '/src/Utilities/AdminNotices/Controller.php',
696
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\AdminNotices\\NoticeVO' => __DIR__ . '/../..' . '/src/Utilities/AdminNotices/NoticeVO.php',
697
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\HCaptcha\\TestRequest' => __DIR__ . '/../..' . '/src/Utilities/HCaptcha/TestRequest.php',
698
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\Options\\CleanStorage' => __DIR__ . '/../..' . '/src/Utilities/Options/CleanStorage.php',
699
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\Enqueue' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/Enqueue.php',
700
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\TestRequest' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/TestRequest.php',
701
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Utilities\\ReCaptcha\\WordpressPost' => __DIR__ . '/../..' . '/src/Utilities/ReCaptcha/WordpressPost.php',
src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Plugins.php CHANGED
@@ -163,14 +163,25 @@ class Plugins {
163
  * @return array
164
  */
165
  public function update( $sFile ) {
166
- require_once( ABSPATH.'wp-admin/includes/upgrade.php' );
167
  require_once( ABSPATH.'wp-admin/includes/class-wp-upgrader.php' );
168
 
 
 
169
  $oSkin = new \Automatic_Upgrader_Skin();
170
- $mResult = ( new \Plugin_Upgrader( $oSkin ) )->upgrade( $sFile );
 
 
 
 
 
 
 
 
 
 
171
 
172
  return [
173
- 'successful' => $mResult === true,
174
  'feedback' => $oSkin->get_upgrade_messages(),
175
  'errors' => is_wp_error( $mResult ) ? $mResult->get_error_messages() : [ 'no errors' ]
176
  ];
@@ -540,7 +551,7 @@ class Plugins {
540
  * @return bool
541
  */
542
  public function isActive( $sFile ) {
543
- return ( $this->isInstalled( $sFile ) && is_plugin_active( $sFile ) );
544
  }
545
 
546
  /**
163
  * @return array
164
  */
165
  public function update( $sFile ) {
 
166
  require_once( ABSPATH.'wp-admin/includes/class-wp-upgrader.php' );
167
 
168
+ $bWasActive = $this->isActive( $sFile );
169
+
170
  $oSkin = new \Automatic_Upgrader_Skin();
171
+ $mResult = ( new \Plugin_Upgrader( $oSkin ) )->bulk_upgrade( [ $sFile ] );
172
+
173
+ $bSuccess = false;
174
+ if ( is_array( $mResult ) && isset( $mResult[ $sFile ] ) ) {
175
+ $mResult = array_shift( $mResult );
176
+ $bSuccess = !empty( $mResult ) && is_array( $mResult );
177
+ }
178
+
179
+ if ( $bWasActive && !$this->isActive( $sFile ) ) {
180
+ $this->activate( $sFile );
181
+ }
182
 
183
  return [
184
+ 'successful' => $bSuccess,
185
  'feedback' => $oSkin->get_upgrade_messages(),
186
  'errors' => is_wp_error( $mResult ) ? $mResult->get_error_messages() : [ 'no errors' ]
187
  ];
551
  * @return bool
552
  */
553
  public function isActive( $sFile ) {
554
+ return $this->isInstalled( $sFile ) && is_plugin_active( $sFile );
555
  }
556
 
557
  /**
src/lib/vendor/psr/cache/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
+
5
+ ## 1.0.1 - 2016-08-06
6
+
7
+ ### Fixed
8
+
9
+ - Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
10
+ - Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
11
+ - Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
12
+ - For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
13
+
14
+ ## 1.0.0 - 2015-12-11
15
+
16
+ Initial stable release; reflects accepted PSR-6 specification
src/processors/plugin.php CHANGED
@@ -7,8 +7,6 @@ use FernleafSystems\Wordpress\Services\Services;
7
 
8
  class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
9
 
10
- /**
11
- */
12
  public function run() {
13
  parent::run();
14
  /** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
@@ -18,12 +16,6 @@ class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
18
 
19
  $this->removePluginConflicts();
20
 
21
- ( new Shield\Crons\HourlyCron() )
22
- ->setMod( $oMod )
23
- ->run();
24
- ( new Shield\Crons\DailyCron() )
25
- ->setMod( $oMod )
26
- ->run();
27
  $oMod->getPluginBadgeCon()->run();
28
 
29
  if ( $oOpts->isTrackingEnabled() || !$oOpts->isTrackingPermissionSet() ) {
@@ -55,8 +47,6 @@ class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
55
  );
56
  }
57
 
58
- /**
59
- */
60
  public function printDashboardWidget() {
61
  $oCon = $this->getCon();
62
  /** @var Plugin\Options $oOpts */
@@ -142,8 +132,6 @@ class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
142
  }
143
  }
144
 
145
- /**
146
- */
147
  public function dumpTrackingData() {
148
  if ( $this->getCon()->isPluginAdmin() ) {
149
  echo sprintf( '<pre><code>%s</code></pre>',
@@ -162,6 +150,10 @@ class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
162
  ->setMod( $this->getMod() )
163
  ->fromSite( $oOpts->getImportExportMasterImportUrl() );
164
  }
 
 
 
 
165
  }
166
 
167
  /**
7
 
8
  class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
9
 
 
 
10
  public function run() {
11
  parent::run();
12
  /** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
16
 
17
  $this->removePluginConflicts();
18
 
 
 
 
 
 
 
19
  $oMod->getPluginBadgeCon()->run();
20
 
21
  if ( $oOpts->isTrackingEnabled() || !$oOpts->isTrackingPermissionSet() ) {
47
  );
48
  }
49
 
 
 
50
  public function printDashboardWidget() {
51
  $oCon = $this->getCon();
52
  /** @var Plugin\Options $oOpts */
132
  }
133
  }
134
 
 
 
135
  public function dumpTrackingData() {
136
  if ( $this->getCon()->isPluginAdmin() ) {
137
  echo sprintf( '<pre><code>%s</code></pre>',
150
  ->setMod( $this->getMod() )
151
  ->fromSite( $oOpts->getImportExportMasterImportUrl() );
152
  }
153
+
154
+ ( new Shield\Utilities\Options\CleanStorage() )
155
+ ->setCon( $this->getCon() )
156
+ ->run();
157
  }
158
 
159
  /**