Version Description
- Add a 'restrict_site_access_ip_match' action which fires when an ip match occurs. Enables adding session_start() to the IP check, ensuring Varnish type cache will not cache the request.
Download this release
Release Info
| Developer | adamsilverstein |
| Plugin | |
| Version | 6.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 6.0.1 to 6.0.2
- readme.txt +3 -0
- restricted_site_access.php +15 -2
readme.txt
CHANGED
|
@@ -73,6 +73,9 @@ Page caching plugins often hook into WordPress to quickly serve the last cached
|
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
|
|
|
|
|
|
|
|
|
| 76 |
= 6.0.1 =
|
| 77 |
* When plugin is network activated, don't touch individual blog visiblity settings.
|
| 78 |
* When plugin is network deactivated, set all individual blogs to default visibility.
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
| 76 |
+
= 6.0.2 =
|
| 77 |
+
* Add a 'restrict_site_access_ip_match' action which fires when an ip match occurs. Enables adding session_start() to the IP check, ensuring Varnish type cache will not cache the request.
|
| 78 |
+
|
| 79 |
= 6.0.1 =
|
| 80 |
* When plugin is network activated, don't touch individual blog visiblity settings.
|
| 81 |
* When plugin is network deactivated, set all individual blogs to default visibility.
|
restricted_site_access.php
CHANGED
|
@@ -3,13 +3,13 @@
|
|
| 3 |
* Plugin Name: Restricted Site Access
|
| 4 |
* Plugin URI: http://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: 6.0.
|
| 7 |
* Author: Jake Goldman, 10up, Oomph
|
| 8 |
* Author URI: http://10up.com
|
| 9 |
* License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
-
define( 'RSA_VERSION', '6.0.
|
| 13 |
|
| 14 |
class Restricted_Site_Access {
|
| 15 |
|
|
@@ -248,6 +248,19 @@ class Restricted_Site_Access {
|
|
| 248 |
|
| 249 |
// check if the masked versions match
|
| 250 |
if ( ( inet_pton( $ip ) & $mask ) == ( $remote_ip & $mask ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
return;
|
| 252 |
}
|
| 253 |
}
|
| 3 |
* Plugin Name: Restricted Site Access
|
| 4 |
* Plugin URI: http://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: 6.0.2
|
| 7 |
* Author: Jake Goldman, 10up, Oomph
|
| 8 |
* Author URI: http://10up.com
|
| 9 |
* License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
+
define( 'RSA_VERSION', '6.0.2' );
|
| 13 |
|
| 14 |
class Restricted_Site_Access {
|
| 15 |
|
| 248 |
|
| 249 |
// check if the masked versions match
|
| 250 |
if ( ( inet_pton( $ip ) & $mask ) == ( $remote_ip & $mask ) ) {
|
| 251 |
+
|
| 252 |
+
/**
|
| 253 |
+
* Fires when an ip address match occurs.
|
| 254 |
+
*
|
| 255 |
+
* Enables adding session_start() to the IP check, ensuring Varnish type cache will not cache the request.
|
| 256 |
+
*
|
| 257 |
+
* @since 6.0.2
|
| 258 |
+
*
|
| 259 |
+
* @param string $remote_ip The remote IP address being checked.
|
| 260 |
+
* @param string $ip The matched IP address.
|
| 261 |
+
* @param string $mast The IP mask used in the match.
|
| 262 |
+
*/
|
| 263 |
+
do_action( 'restrict_site_access_ip_match', $remote_ip, $ip, $mask );
|
| 264 |
return;
|
| 265 |
}
|
| 266 |
}
|
