Restricted Site Access - Version 7.3.5

Version Description

  • 2022-12-14 =
  • Added: Show an admin notice if our autoloader doesn't exist (props @dkotter, @pablojmarti, @shahzaib10up, @peterwilsoncc via #231).
  • Fixed: Ensure we load our autoloader from the root of our plugin directory (props @dkotter, @pablojmarti, @shahzaib10up, @peterwilsoncc via #231).
  • Changed: Improved performance of our E2E tests (props @Sidsector9, @iamdharmesh via #218).
  • Changed: Release instructions and release ZIP building via GitHub Action (props @dkotter, @faisal-alvi via #232).
  • Security: Bump loader-utils from 2.0.3 to 2.0.4 (props @dependabot via #226).
  • Security: Bump simple-git from 3.6.0 to 3.15.0 (props @dependabot via #230).
Download this release

Release Info

Developer 10up
Plugin Icon 128x128 Restricted Site Access
Version 7.3.5
Comparing to
See all releases

Code changes from version 7.3.4 to 7.3.5

.gitattributes DELETED
@@ -1,28 +0,0 @@
1
- # Directories
2
- /.git export-ignore
3
- /.github export-ignore
4
- /.wordpress-org export-ignore
5
- /bin export-ignore
6
- /tests export-ignore
7
-
8
- # Files
9
- /.editorconfig export-ignore
10
- /.eslintrc.js export-ignore
11
- /.gitattributes export-ignore
12
- /.gitignore export-ignore
13
- /.wp-env.json export-ignore
14
- /CHANGELOG.md export-ignore
15
- /CODE_OF_CONDUCT.md export-ignore
16
- /composer.json export-ignore
17
- /composer.lock export-ignore
18
- /CONTRIBUTING.md export-ignore
19
- /CREDITS.md export-ignore
20
- /Gruntfile.js export-ignore
21
- /LICENSE.md export-ignore
22
- /package-lock.json export-ignore
23
- /package.json export-ignore
24
- /phpunit.xml export-ignore
25
- /README.md export-ignore
26
- /run-wpacceptance.sh export-ignore
27
- /wpacceptance.json export-ignore
28
- /webpack.config.js export-ignore
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
phpcs.xml.dist DELETED
@@ -1,24 +0,0 @@
1
- <?xml version="1.0"?>
2
- <ruleset name="Project Rules">
3
-
4
- <!-- Only scan PHP files. -->
5
- <arg name="extensions" value="php"/>
6
-
7
- <!-- Show sniff codes in all reports. -->
8
- <arg value="ps"/>
9
-
10
- <file>.</file>
11
-
12
- <exclude-pattern type="relative">^tests/*</exclude-pattern>
13
- <exclude-pattern type="relative">^vendor/*</exclude-pattern>
14
-
15
- <rule ref="10up-Default" />
16
- <rule ref="WordPress-VIP-Go">
17
- <!--
18
- This plugin is designed to run on both standard WordPress installs
19
- and on WordPress VIP installs. As such the WP-CLI command included
20
- needs to be able to run without the WordPress VIP mu-plugins.
21
- -->
22
- <exclude name="WordPressVIPMinimum.Classes.RestrictedExtendClasses.wp_cli" />
23
- </rule>
24
- </ruleset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
phpunit.xml DELETED
@@ -1,28 +0,0 @@
1
- <phpunit
2
- bootstrap="tests/php/bootstrap.php"
3
- backupGlobals="false"
4
- colors="true"
5
- verbose="true"
6
- >
7
- <testsuites>
8
- <testsuite name="restricted-site-access-unit-tests">
9
- <directory suffix=".php">tests/php</directory>
10
- <exclude>tests/php/code-coverage.php</exclude>
11
- <exclude>tests/php/multisite</exclude>
12
- <exclude>tests/php/whitelist</exclude>
13
- </testsuite>
14
- </testsuites>
15
- <filter>
16
- <whitelist>
17
- <file>restricted_site_access.php</file>
18
- </whitelist>
19
- </filter>
20
- <php>
21
- <ini name="error_reporting" value="32767" />
22
- <ini name="display_errors" value="1" />
23
- <ini name="display_startup_errors" value="1" />
24
- </php>
25
- <logging>
26
- <log type="coverage-php" target="test-coverage/coverage.serialized"/>
27
- </logging>
28
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://10up.com/plugins/restricted-site-access-wordpress/
4
  Tags: privacy, restricted, restrict, privacy, limited, permissions, security, block
5
  Requires at least: 5.7
6
  Tested up to: 6.1
7
- Stable tag: 7.3.4
8
  Requires PHP: 7.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -198,6 +198,14 @@ Please note that setting `RSA_FORCE_RESTRICTION` will override `RSA_FORBID_RESTR
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
 
 
 
201
  = 7.3.4 - 2022-11-01 =
202
  * **Fixed:** Fatal error due to missing vendor directory.
203
 
4
  Tags: privacy, restricted, restrict, privacy, limited, permissions, security, block
5
  Requires at least: 5.7
6
  Tested up to: 6.1
7
+ Stable tag: 7.3.5
8
  Requires PHP: 7.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
198
 
199
  == Changelog ==
200
 
201
+ = 7.3.5 - 2022-12-14 =
202
+ * **Added:** Show an admin notice if our autoloader doesn't exist (props [@dkotter](https://github.com/dkotter), [@pablojmarti](https://github.com/pablojmarti), [@shahzaib10up](https://github.com/shahzaib10up), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#231](https://github.com/10up/restricted-site-access/pull/231)).
203
+ * **Fixed:** Ensure we load our autoloader from the root of our plugin directory (props [@dkotter](https://github.com/dkotter), [@pablojmarti](https://github.com/pablojmarti), [@shahzaib10up](https://github.com/shahzaib10up), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#231](https://github.com/10up/restricted-site-access/pull/231)).
204
+ * **Changed:** Improved performance of our E2E tests (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#218](https://github.com/10up/restricted-site-access/pull/218)).
205
+ * **Changed:** Release instructions and release ZIP building via GitHub Action (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#232](https://github.com/10up/restricted-site-access/pull/232)).
206
+ * **Security:** Bump `loader-utils` from 2.0.3 to 2.0.4 (props [@dependabot](https://github.com/apps/dependabot) via [#226](https://github.com/10up/restricted-site-access/pull/226)).
207
+ * **Security:** Bump `simple-git` from 3.6.0 to 3.15.0 (props [@dependabot](https://github.com/apps/dependabot) via [#230](https://github.com/10up/restricted-site-access/pull/230)).
208
+
209
  = 7.3.4 - 2022-11-01 =
210
  * **Fixed:** Fatal error due to missing vendor directory.
211
 
restricted_site_access.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Restricted Site Access
4
  * Plugin URI: https://10up.com/plugins/restricted-site-access-wordpress/
5
  * Description: <strong>Limit access your site</strong> to visitors who are logged in or accessing the site from a set of specific IP addresses. Send restricted visitors to the log in page, redirect them, or display a message or page. <strong>Powerful control over redirection</strong>, including <strong>SEO friendly redirect headers</strong>. Great solution for Extranets, publicly hosted Intranets, or parallel development sites.
6
- * Version: 7.3.4
7
  * Requires at least: 5.7
8
  * Requires PHP: 7.4
9
  * Author: Jake Goldman, 10up, Oomph
@@ -13,9 +13,34 @@
13
  * Text Domain: restricted-site-access
14
  */
15
 
16
- require_once 'vendor/autoload.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- define( 'RSA_VERSION', '7.3.4' );
19
 
20
  /**
21
  * Class responsible for all plugin funcitonality.
3
  * Plugin Name: Restricted Site Access
4
  * Plugin URI: https://10up.com/plugins/restricted-site-access-wordpress/
5
  * Description: <strong>Limit access your site</strong> to visitors who are logged in or accessing the site from a set of specific IP addresses. Send restricted visitors to the log in page, redirect them, or display a message or page. <strong>Powerful control over redirection</strong>, including <strong>SEO friendly redirect headers</strong>. Great solution for Extranets, publicly hosted Intranets, or parallel development sites.
6
+ * Version: 7.3.5
7
  * Requires at least: 5.7
8
  * Requires PHP: 7.4
9
  * Author: Jake Goldman, 10up, Oomph
13
  * Text Domain: restricted-site-access
14
  */
15
 
16
+ // Try and include our autoloader.
17
+ if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
18
+ require_once __DIR__ . '/vendor/autoload.php';
19
+ } elseif ( ! class_exists( 'IPLib\\Factory' ) ) {
20
+ add_action(
21
+ 'admin_notices',
22
+ function() {
23
+ ?>
24
+ <div class="notice notice-error">
25
+ <p>
26
+ <?php
27
+ echo wp_kses_post(
28
+ sprintf(
29
+ /* translators: %1$s is the command that needs to be run. */
30
+ __( 'You appear to be running a development version of Restricted Site Access. Please run %1$s in order for things to work properly.', 'restricted-site-access' ),
31
+ '<code>composer install</code>'
32
+ )
33
+ );
34
+ ?>
35
+ </p>
36
+ </div>
37
+ <?php
38
+ }
39
+ );
40
+ return;
41
+ }
42
 
43
+ define( 'RSA_VERSION', '7.3.5' );
44
 
45
  /**
46
  * Class responsible for all plugin funcitonality.
vendor/autoload.php CHANGED
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
22
 
23
  require_once __DIR__ . '/composer/autoload_real.php';
24
 
25
- return ComposerAutoloaderInita3f7bfdb9e7229bdf95aaef37022fd47::getLoader();
22
 
23
  require_once __DIR__ . '/composer/autoload_real.php';
24
 
25
+ return ComposerAutoloaderInitde303c0e077b2b267d3b77156218531e::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita3f7bfdb9e7229bdf95aaef37022fd47
6
  {
7
  private static $loader;
8
 
@@ -24,12 +24,12 @@ class ComposerAutoloaderInita3f7bfdb9e7229bdf95aaef37022fd47
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInita3f7bfdb9e7229bdf95aaef37022fd47', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
- spl_autoload_unregister(array('ComposerAutoloaderInita3f7bfdb9e7229bdf95aaef37022fd47', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
- call_user_func(\Composer\Autoload\ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitde303c0e077b2b267d3b77156218531e
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitde303c0e077b2b267d3b77156218531e', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitde303c0e077b2b267d3b77156218531e', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
+ call_user_func(\Composer\Autoload\ComposerStaticInitde303c0e077b2b267d3b77156218531e::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'I' =>
@@ -27,9 +27,9 @@ class ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47
27
  public static function getInitializer(ClassLoader $loader)
28
  {
29
  return \Closure::bind(function () use ($loader) {
30
- $loader->prefixLengthsPsr4 = ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47::$prefixLengthsPsr4;
31
- $loader->prefixDirsPsr4 = ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47::$prefixDirsPsr4;
32
- $loader->classMap = ComposerStaticInita3f7bfdb9e7229bdf95aaef37022fd47::$classMap;
33
 
34
  }, null, ClassLoader::class);
35
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitde303c0e077b2b267d3b77156218531e
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'I' =>
27
  public static function getInitializer(ClassLoader $loader)
28
  {
29
  return \Closure::bind(function () use ($loader) {
30
+ $loader->prefixLengthsPsr4 = ComposerStaticInitde303c0e077b2b267d3b77156218531e::$prefixLengthsPsr4;
31
+ $loader->prefixDirsPsr4 = ComposerStaticInitde303c0e077b2b267d3b77156218531e::$prefixDirsPsr4;
32
+ $loader->classMap = ComposerStaticInitde303c0e077b2b267d3b77156218531e::$classMap;
33
 
34
  }, null, ClassLoader::class);
35
  }
vendor/composer/installed.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php return array(
2
  'root' => array(
3
  'name' => '10up/restricted-site-access',
4
- 'pretty_version' => '7.3.4',
5
- 'version' => '7.3.4.0',
6
- 'reference' => '4abd9aadf8d0626f89322559a3ca041c61214b63',
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -11,9 +11,9 @@
11
  ),
12
  'versions' => array(
13
  '10up/restricted-site-access' => array(
14
- 'pretty_version' => '7.3.4',
15
- 'version' => '7.3.4.0',
16
- 'reference' => '4abd9aadf8d0626f89322559a3ca041c61214b63',
17
  'type' => 'wordpress-plugin',
18
  'install_path' => __DIR__ . '/../../',
19
  'aliases' => array(),
1
  <?php return array(
2
  'root' => array(
3
  'name' => '10up/restricted-site-access',
4
+ 'pretty_version' => '7.3.5',
5
+ 'version' => '7.3.5.0',
6
+ 'reference' => '36669d6133761b4be8f290067f86d6cc53dfcf25',
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
11
  ),
12
  'versions' => array(
13
  '10up/restricted-site-access' => array(
14
+ 'pretty_version' => '7.3.5',
15
+ 'version' => '7.3.5.0',
16
+ 'reference' => '36669d6133761b4be8f290067f86d6cc53dfcf25',
17
  'type' => 'wordpress-plugin',
18
  'install_path' => __DIR__ . '/../../',
19
  'aliases' => array(),
webpack.config.js DELETED
@@ -1,30 +0,0 @@
1
- const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );
2
- const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
3
- const path = require( 'path' );
4
-
5
- module.exports = {
6
- ...defaultConfig,
7
- entry: {
8
- ...defaultConfig.entry,
9
- admin: './assets/js/src/admin.js',
10
- settings: './assets/js/src/settings.js',
11
- },
12
- output: {
13
- path: path.resolve( __dirname, 'assets/js/build' ),
14
- filename: '[name].min.js',
15
- },
16
- plugins: [
17
- ...defaultConfig.plugins,
18
- new DependencyExtractionWebpackPlugin( {
19
- requestToExternal( request ) {
20
- if ( 'jquery-effects-shake' === request ) {
21
- return 'jquery-effects-shake';
22
- }
23
-
24
- if ( 'jquery-ui-dialog' === request ) {
25
- return 'jquery-ui-dialog';
26
- }
27
- },
28
- } ),
29
- ],
30
- };