Rename wp-login.php - Version 2.2.2

Version Description

Download this release

Release Info

Developer avryl
Plugin Icon 128x128 Rename wp-login.php
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

Files changed (3) hide show
  1. readme.md +2 -2
  2. readme.txt +2 -2
  3. rename-wp-login.php +5 -3
readme.md CHANGED
@@ -3,8 +3,8 @@
3
  **Contributors:** avryl
4
  **Tags:** rename, login, wp-login, wp-login.php, brute force attacks, custom login url, security
5
  **Requires at least:** 3.8
6
- **Tested up to:** 3.8
7
- **Stable tag:** 2.2.1
8
  **License:** GPLv2 or later
9
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
 
3
  **Contributors:** avryl
4
  **Tags:** rename, login, wp-login, wp-login.php, brute force attacks, custom login url, security
5
  **Requires at least:** 3.8
6
+ **Tested up to:** 3.8.1
7
+ **Stable tag:** 2.2.2
8
  **License:** GPLv2 or later
9
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: avryl
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=49WXVSPP2HUKG
5
  Tags: rename, login, wp-login, wp-login.php, brute force attacks, custom login url, security
6
  Requires at least: 3.8
7
- Tested up to: 3.8
8
- Stable tag: 2.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=49WXVSPP2HUKG
5
  Tags: rename, login, wp-login, wp-login.php, brute force attacks, custom login url, security
6
  Requires at least: 3.8
7
+ Tested up to: 3.8.1
8
+ Stable tag: 2.2.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
rename-wp-login.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wordpress.org/plugins/rename-wp-login/
6
  Description: Change wp-login.php to whatever you want. It can also prevent a lot of brute force attacks.
7
  Author: avryl
8
  Author URI: http://profiles.wordpress.org/avryl/
9
- Version: 2.2.1
10
  Text Domain: rename-wp-login
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -405,7 +405,8 @@ if ( ! class_exists( 'Rename_WP_Login' )
405
 
406
  $request = parse_url( $_SERVER['REQUEST_URI'] );
407
 
408
- if ( strpos( $_SERVER['REQUEST_URI'], 'wp-login' ) !== false
 
409
  && ! is_admin() ) {
410
 
411
  $this->wp_login_php = true;
@@ -442,7 +443,8 @@ if ( ! class_exists( 'Rename_WP_Login' )
442
  $request = parse_url( $_SERVER['REQUEST_URI'] );
443
 
444
  if ( $pagenow === 'wp-login.php'
445
- && $request['path'] !== $this->user_trailingslashit( $request['path'] ) ) {
 
446
 
447
  wp_safe_redirect( $this->user_trailingslashit( $this->new_login_url() )
448
  . ( ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . $_SERVER['QUERY_STRING'] : '' ) );
6
  Description: Change wp-login.php to whatever you want. It can also prevent a lot of brute force attacks.
7
  Author: avryl
8
  Author URI: http://profiles.wordpress.org/avryl/
9
+ Version: 2.2.2
10
  Text Domain: rename-wp-login
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
405
 
406
  $request = parse_url( $_SERVER['REQUEST_URI'] );
407
 
408
+ if ( ( strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) !== false
409
+ || untrailingslashit( $request['path'] ) === site_url( 'wp-login', 'relative' ) )
410
  && ! is_admin() ) {
411
 
412
  $this->wp_login_php = true;
443
  $request = parse_url( $_SERVER['REQUEST_URI'] );
444
 
445
  if ( $pagenow === 'wp-login.php'
446
+ && $request['path'] !== $this->user_trailingslashit( $request['path'] )
447
+ && get_option( 'permalink_structure' ) ) {
448
 
449
  wp_safe_redirect( $this->user_trailingslashit( $this->new_login_url() )
450
  . ( ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . $_SERVER['QUERY_STRING'] : '' ) );