Shield Security for WordPress - Version 14.0.3

Version Description

Download this release

Release Info

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

Code changes from version 14.0.2 to 14.0.3

cl.json CHANGED
@@ -109,6 +109,12 @@
109
  "title": "Options Search dialog failed to open (can't find-as-you-type yet).",
110
  "description": [],
111
  "patch": "14.0.2"
 
 
 
 
 
 
112
  }
113
  ]
114
  },
109
  "title": "Options Search dialog failed to open (can't find-as-you-type yet).",
110
  "description": [],
111
  "patch": "14.0.2"
112
+ },
113
+ {
114
+ "type": "fixed",
115
+ "title": "Work around WP Engine login mechanism blocking 2FA verification.",
116
+ "description": [],
117
+ "patch": "14.0.3"
118
  }
119
  ]
120
  },
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: 14.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: 14.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": "14.0.2",
4
- "release_timestamp": 1644423882,
5
- "build": "202202.0902",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "14.0.3",
4
+ "release_timestamp": 1645003743,
5
+ "build": "202202.1601",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
plugin.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "14.0.2",
4
- "release_timestamp": 1644423882,
5
- "build": "202202.0902",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "14.0.3",
4
+ "release_timestamp": 1645003743,
5
+ "build": "202202.1601",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
readme.txt CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.7
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.9
11
- Stable tag: 14.0.2
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 5.9
11
+ Stable tag: 14.0.3
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
src/lib/src/Modules/LoginGuard/Lib/TwoFactor/Render/RenderBase.php CHANGED
@@ -43,9 +43,10 @@ abstract class RenderBase {
43
 
44
  return [
45
  'hrefs' => [
46
- 'form_action' => add_query_arg( [
47
- 'shield_action' => 'wp_login_2fa_verify'
48
- ], $WP->getLoginUrl() ),
 
49
  ],
50
  'flags' => [
51
  'can_skip_mfa' => $opts->isMfaSkip(),
43
 
44
  return [
45
  'hrefs' => [
46
+ 'form_action' => add_query_arg( array_filter( [
47
+ 'shield_action' => 'wp_login_2fa_verify',
48
+ 'wpe-login' => ( function_exists( 'getenv' ) && @getenv( 'IS_WPE' ) ) ? 'true' : false
49
+ ] ), $WP->getLoginUrl() ),
50
  ],
51
  'flags' => [
52
  'can_skip_mfa' => $opts->isMfaSkip(),
src/lib/src/Utilities/AdminNotices/Controller.php CHANGED
@@ -21,14 +21,13 @@ class Controller {
21
  * @param string $msg
22
  * @return string
23
  */
24
- public function onLoginMessage( $msg ) {
25
  $msg = $this->retrieveFlashMessage();
26
  if ( is_array( $msg ) && isset( $msg[ 'show_login' ] ) && $msg[ 'show_login' ] ) {
27
- $msg .= sprintf( '<p class="message">%s</p>', sanitize_text_field( $msg[ 'message' ] ) );
28
- error_log( $msg );
29
  $this->clearFlashMessage();
30
  }
31
- return $msg;
32
  }
33
 
34
  /**
21
  * @param string $msg
22
  * @return string
23
  */
24
+ public function onLoginMessage( $loginMsg ) {
25
  $msg = $this->retrieveFlashMessage();
26
  if ( is_array( $msg ) && isset( $msg[ 'show_login' ] ) && $msg[ 'show_login' ] ) {
27
+ $loginMsg .= sprintf( '<p class="message">%s</p>', sanitize_text_field( $msg[ 'message' ] ) );
 
28
  $this->clearFlashMessage();
29
  }
30
+ return $loginMsg;
31
  }
32
 
33
  /**
src/lib/vendor/composer/ClassLoader.php CHANGED
@@ -42,75 +42,30 @@ namespace Composer\Autoload;
42
  */
43
  class ClassLoader
44
  {
45
- /** @var ?string */
46
  private $vendorDir;
47
 
48
  // PSR-4
49
- /**
50
- * @var array[]
51
- * @psalm-var array<string, array<string, int>>
52
- */
53
  private $prefixLengthsPsr4 = array();
54
- /**
55
- * @var array[]
56
- * @psalm-var array<string, array<int, string>>
57
- */
58
  private $prefixDirsPsr4 = array();
59
- /**
60
- * @var array[]
61
- * @psalm-var array<string, string>
62
- */
63
  private $fallbackDirsPsr4 = array();
64
 
65
  // PSR-0
66
- /**
67
- * @var array[]
68
- * @psalm-var array<string, array<string, string[]>>
69
- */
70
  private $prefixesPsr0 = array();
71
- /**
72
- * @var array[]
73
- * @psalm-var array<string, string>
74
- */
75
  private $fallbackDirsPsr0 = array();
76
 
77
- /** @var bool */
78
  private $useIncludePath = false;
79
-
80
- /**
81
- * @var string[]
82
- * @psalm-var array<string, string>
83
- */
84
  private $classMap = array();
85
-
86
- /** @var bool */
87
  private $classMapAuthoritative = false;
88
-
89
- /**
90
- * @var bool[]
91
- * @psalm-var array<string, bool>
92
- */
93
  private $missingClasses = array();
94
-
95
- /** @var ?string */
96
  private $apcuPrefix;
97
 
98
- /**
99
- * @var self[]
100
- */
101
  private static $registeredLoaders = array();
102
 
103
- /**
104
- * @param ?string $vendorDir
105
- */
106
  public function __construct($vendorDir = null)
107
  {
108
  $this->vendorDir = $vendorDir;
109
  }
110
 
111
- /**
112
- * @return string[]
113
- */
114
  public function getPrefixes()
115
  {
116
  if (!empty($this->prefixesPsr0)) {
@@ -120,47 +75,28 @@ class ClassLoader
120
  return array();
121
  }
122
 
123
- /**
124
- * @return array[]
125
- * @psalm-return array<string, array<int, string>>
126
- */
127
  public function getPrefixesPsr4()
128
  {
129
  return $this->prefixDirsPsr4;
130
  }
131
 
132
- /**
133
- * @return array[]
134
- * @psalm-return array<string, string>
135
- */
136
  public function getFallbackDirs()
137
  {
138
  return $this->fallbackDirsPsr0;
139
  }
140
 
141
- /**
142
- * @return array[]
143
- * @psalm-return array<string, string>
144
- */
145
  public function getFallbackDirsPsr4()
146
  {
147
  return $this->fallbackDirsPsr4;
148
  }
149
 
150
- /**
151
- * @return string[] Array of classname => path
152
- * @psalm-var array<string, string>
153
- */
154
  public function getClassMap()
155
  {
156
  return $this->classMap;
157
  }
158
 
159
  /**
160
- * @param string[] $classMap Class to filename map
161
- * @psalm-param array<string, string> $classMap
162
- *
163
- * @return void
164
  */
165
  public function addClassMap(array $classMap)
166
  {
@@ -175,11 +111,9 @@ class ClassLoader
175
  * Registers a set of PSR-0 directories for a given prefix, either
176
  * appending or prepending to the ones previously set for this prefix.
177
  *
178
- * @param string $prefix The prefix
179
- * @param string[]|string $paths The PSR-0 root directories
180
- * @param bool $prepend Whether to prepend the directories
181
- *
182
- * @return void
183
  */
184
  public function add($prefix, $paths, $prepend = false)
185
  {
@@ -222,13 +156,11 @@ class ClassLoader
222
  * Registers a set of PSR-4 directories for a given namespace, either
223
  * appending or prepending to the ones previously set for this namespace.
224
  *
225
- * @param string $prefix The prefix/namespace, with trailing '\\'
226
- * @param string[]|string $paths The PSR-4 base directories
227
- * @param bool $prepend Whether to prepend the directories
228
  *
229
  * @throws \InvalidArgumentException
230
- *
231
- * @return void
232
  */
233
  public function addPsr4($prefix, $paths, $prepend = false)
234
  {
@@ -272,10 +204,8 @@ class ClassLoader
272
  * Registers a set of PSR-0 directories for a given prefix,
273
  * replacing any others previously set for this prefix.
274
  *
275
- * @param string $prefix The prefix
276
- * @param string[]|string $paths The PSR-0 base directories
277
- *
278
- * @return void
279
  */
280
  public function set($prefix, $paths)
281
  {
@@ -290,12 +220,10 @@ class ClassLoader
290
  * Registers a set of PSR-4 directories for a given namespace,
291
  * replacing any others previously set for this namespace.
292
  *
293
- * @param string $prefix The prefix/namespace, with trailing '\\'
294
- * @param string[]|string $paths The PSR-4 base directories
295
  *
296
  * @throws \InvalidArgumentException
297
- *
298
- * @return void
299
  */
300
  public function setPsr4($prefix, $paths)
301
  {
@@ -315,8 +243,6 @@ class ClassLoader
315
  * Turns on searching the include path for class files.
316
  *
317
  * @param bool $useIncludePath
318
- *
319
- * @return void
320
  */
321
  public function setUseIncludePath($useIncludePath)
322
  {
@@ -339,8 +265,6 @@ class ClassLoader
339
  * that have not been registered with the class map.
340
  *
341
  * @param bool $classMapAuthoritative
342
- *
343
- * @return void
344
  */
345
  public function setClassMapAuthoritative($classMapAuthoritative)
346
  {
@@ -361,8 +285,6 @@ class ClassLoader
361
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
  *
363
  * @param string|null $apcuPrefix
364
- *
365
- * @return void
366
  */
367
  public function setApcuPrefix($apcuPrefix)
368
  {
@@ -383,18 +305,14 @@ class ClassLoader
383
  * Registers this instance as an autoloader.
384
  *
385
  * @param bool $prepend Whether to prepend the autoloader or not
386
- *
387
- * @return void
388
  */
389
  public function register($prepend = false)
390
  {
391
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
 
393
  if (null === $this->vendorDir) {
394
- return;
395
- }
396
-
397
- if ($prepend) {
398
  self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
  } else {
400
  unset(self::$registeredLoaders[$this->vendorDir]);
@@ -404,8 +322,6 @@ class ClassLoader
404
 
405
  /**
406
  * Unregisters this instance as an autoloader.
407
- *
408
- * @return void
409
  */
410
  public function unregister()
411
  {
@@ -420,7 +336,7 @@ class ClassLoader
420
  * Loads the given class or interface.
421
  *
422
  * @param string $class The name of the class
423
- * @return true|null True if loaded, null otherwise
424
  */
425
  public function loadClass($class)
426
  {
@@ -429,8 +345,6 @@ class ClassLoader
429
 
430
  return true;
431
  }
432
-
433
- return null;
434
  }
435
 
436
  /**
@@ -485,11 +399,6 @@ class ClassLoader
485
  return self::$registeredLoaders;
486
  }
487
 
488
- /**
489
- * @param string $class
490
- * @param string $ext
491
- * @return string|false
492
- */
493
  private function findFileWithExtension($class, $ext)
494
  {
495
  // PSR-4 lookup
@@ -561,10 +470,6 @@ class ClassLoader
561
  * Scope isolated include.
562
  *
563
  * Prevents access to $this/self from included files.
564
- *
565
- * @param string $file
566
- * @return void
567
- * @private
568
  */
569
  function includeFile($file)
570
  {
42
  */
43
  class ClassLoader
44
  {
 
45
  private $vendorDir;
46
 
47
  // PSR-4
 
 
 
 
48
  private $prefixLengthsPsr4 = array();
 
 
 
 
49
  private $prefixDirsPsr4 = array();
 
 
 
 
50
  private $fallbackDirsPsr4 = array();
51
 
52
  // PSR-0
 
 
 
 
53
  private $prefixesPsr0 = array();
 
 
 
 
54
  private $fallbackDirsPsr0 = array();
55
 
 
56
  private $useIncludePath = false;
 
 
 
 
 
57
  private $classMap = array();
 
 
58
  private $classMapAuthoritative = false;
 
 
 
 
 
59
  private $missingClasses = array();
 
 
60
  private $apcuPrefix;
61
 
 
 
 
62
  private static $registeredLoaders = array();
63
 
 
 
 
64
  public function __construct($vendorDir = null)
65
  {
66
  $this->vendorDir = $vendorDir;
67
  }
68
 
 
 
 
69
  public function getPrefixes()
70
  {
71
  if (!empty($this->prefixesPsr0)) {
75
  return array();
76
  }
77
 
 
 
 
 
78
  public function getPrefixesPsr4()
79
  {
80
  return $this->prefixDirsPsr4;
81
  }
82
 
 
 
 
 
83
  public function getFallbackDirs()
84
  {
85
  return $this->fallbackDirsPsr0;
86
  }
87
 
 
 
 
 
88
  public function getFallbackDirsPsr4()
89
  {
90
  return $this->fallbackDirsPsr4;
91
  }
92
 
 
 
 
 
93
  public function getClassMap()
94
  {
95
  return $this->classMap;
96
  }
97
 
98
  /**
99
+ * @param array $classMap Class to filename map
 
 
 
100
  */
101
  public function addClassMap(array $classMap)
102
  {
111
  * Registers a set of PSR-0 directories for a given prefix, either
112
  * appending or prepending to the ones previously set for this prefix.
113
  *
114
+ * @param string $prefix The prefix
115
+ * @param array|string $paths The PSR-0 root directories
116
+ * @param bool $prepend Whether to prepend the directories
 
 
117
  */
118
  public function add($prefix, $paths, $prepend = false)
119
  {
156
  * Registers a set of PSR-4 directories for a given namespace, either
157
  * appending or prepending to the ones previously set for this namespace.
158
  *
159
+ * @param string $prefix The prefix/namespace, with trailing '\\'
160
+ * @param array|string $paths The PSR-4 base directories
161
+ * @param bool $prepend Whether to prepend the directories
162
  *
163
  * @throws \InvalidArgumentException
 
 
164
  */
165
  public function addPsr4($prefix, $paths, $prepend = false)
166
  {
204
  * Registers a set of PSR-0 directories for a given prefix,
205
  * replacing any others previously set for this prefix.
206
  *
207
+ * @param string $prefix The prefix
208
+ * @param array|string $paths The PSR-0 base directories
 
 
209
  */
210
  public function set($prefix, $paths)
211
  {
220
  * Registers a set of PSR-4 directories for a given namespace,
221
  * replacing any others previously set for this namespace.
222
  *
223
+ * @param string $prefix The prefix/namespace, with trailing '\\'
224
+ * @param array|string $paths The PSR-4 base directories
225
  *
226
  * @throws \InvalidArgumentException
 
 
227
  */
228
  public function setPsr4($prefix, $paths)
229
  {
243
  * Turns on searching the include path for class files.
244
  *
245
  * @param bool $useIncludePath
 
 
246
  */
247
  public function setUseIncludePath($useIncludePath)
248
  {
265
  * that have not been registered with the class map.
266
  *
267
  * @param bool $classMapAuthoritative
 
 
268
  */
269
  public function setClassMapAuthoritative($classMapAuthoritative)
270
  {
285
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
286
  *
287
  * @param string|null $apcuPrefix
 
 
288
  */
289
  public function setApcuPrefix($apcuPrefix)
290
  {
305
  * Registers this instance as an autoloader.
306
  *
307
  * @param bool $prepend Whether to prepend the autoloader or not
 
 
308
  */
309
  public function register($prepend = false)
310
  {
311
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
312
 
313
  if (null === $this->vendorDir) {
314
+ //no-op
315
+ } elseif ($prepend) {
 
 
316
  self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
317
  } else {
318
  unset(self::$registeredLoaders[$this->vendorDir]);
322
 
323
  /**
324
  * Unregisters this instance as an autoloader.
 
 
325
  */
326
  public function unregister()
327
  {
336
  * Loads the given class or interface.
337
  *
338
  * @param string $class The name of the class
339
+ * @return bool|null True if loaded, null otherwise
340
  */
341
  public function loadClass($class)
342
  {
345
 
346
  return true;
347
  }
 
 
348
  }
349
 
350
  /**
399
  return self::$registeredLoaders;
400
  }
401
 
 
 
 
 
 
402
  private function findFileWithExtension($class, $ext)
403
  {
404
  // PSR-4 lookup
470
  * Scope isolated include.
471
  *
472
  * Prevents access to $this/self from included files.
 
 
 
 
473
  */
474
  function includeFile($file)
475
  {