Password Protected - Version 1.2.2

Version Description

  • Escape 'redirect_to' attribute. Props A. Alagha.
  • Show login error messages.
Download this release

Release Info

Developer husobj
Plugin Icon 128x128 Password Protected
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

Files changed (3) hide show
  1. password-protected.php +3 -3
  2. readme.txt +6 -1
  3. theme/login.php +2 -1
password-protected.php CHANGED
@@ -3,8 +3,8 @@
3
  /*
4
  Plugin Name: Password Protected
5
  Plugin URI: http://www.benhuson.co.uk/
6
- A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
7
- Version: 1.2.1
8
  Author: Ben Huson
9
  Author URI: http://www.benhuson.co.uk/
10
  License: GPLv2
@@ -131,7 +131,7 @@ class Password_Protected {
131
  return;
132
 
133
  // Show login form
134
- if ( isset( $_GET['password-protected'] ) && 'login' == $_GET['password-protected'] ) {
135
  include( dirname( __FILE__ ) . '/theme/login.php' );
136
  exit();
137
  } else {
3
  /*
4
  Plugin Name: Password Protected
5
  Plugin URI: http://www.benhuson.co.uk/
6
+ Description: A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
7
+ Version: 1.2.2
8
  Author: Ben Huson
9
  Author URI: http://www.benhuson.co.uk/
10
  License: GPLv2
131
  return;
132
 
133
  // Show login form
134
+ if ( isset( $_REQUEST['password-protected'] ) && 'login' == $_REQUEST['password-protected'] ) {
135
  include( dirname( __FILE__ ) . '/theme/login.php' );
136
  exit();
137
  } else {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.benhuson.co.uk/donate/
4
  Tags: password, protect, password protect, login
5
  Requires at least: 3.0
6
  Tested up to: 3.3.1
7
- Stable tag: 1.2.1
8
 
9
  A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
10
 
@@ -57,6 +57,11 @@ If you can, please [fork the code](https://github.com/benhuson/password-protecte
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
60
  = 1.2.1 =
61
 
62
  * Only disable feeds when protection is active.
4
  Tags: password, protect, password protect, login
5
  Requires at least: 3.0
6
  Tested up to: 3.3.1
7
+ Stable tag: 1.2.2
8
 
9
  A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings.
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.2.2 =
61
+
62
+ * Escape 'redirect_to' attribute. Props A. Alagha.
63
+ * Show login error messages.
64
+
65
  = 1.2.1 =
66
 
67
  * Only disable feeds when protection is active.
theme/login.php CHANGED
@@ -118,7 +118,8 @@ do_action( 'password_protected_login_head' );
118
  <p class="submit">
119
  <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="100" />
120
  <input type="hidden" name="testcookie" value="1" />
121
- <input type="hidden" name="redirect_to" value="<?php echo $_REQUEST['redirect_to']; ?>" />
 
122
  </p>
123
  </form>
124
 
118
  <p class="submit">
119
  <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="100" />
120
  <input type="hidden" name="testcookie" value="1" />
121
+ <input type="hidden" name="password-protected" value="login" />
122
+ <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $_REQUEST['redirect_to'] ); ?>" />
123
  </p>
124
  </form>
125