Change wp-admin login - Version 1.0.9

Version Description

  • fix security issue
Download this release

Release Info

Developer nunosarmento
Plugin Icon 128x128 Change wp-admin login
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

change-wp-admin-login.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Change wp-admin login
4
  Plugin URI: https://wordpress.org/plugins/change-wp-admin-login/
5
  Description: Change wp-admin login to whatever you want. example: http://www.example.com/my-login. Go under Settings and then click on "Permalinks" and change your URL under "Change wp-admin login".
6
- Version: 1.0.8
7
  Author: Nuno Morais Sarmento
8
  Author URI: https://www.nuno-sarmento.com
9
  Text Domain: change-wp-admin-login
3
  Plugin Name: Change wp-admin login
4
  Plugin URI: https://wordpress.org/plugins/change-wp-admin-login/
5
  Description: Change wp-admin login to whatever you want. example: http://www.example.com/my-login. Go under Settings and then click on "Permalinks" and change your URL under "Change wp-admin login".
6
+ Version: 1.0.9
7
  Author: Nuno Morais Sarmento
8
  Author URI: https://www.nuno-sarmento.com
9
  Text Domain: change-wp-admin-login
includes/class-change-wp-admin-login.php CHANGED
@@ -186,22 +186,16 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Change_WP_Admin_Login' ) ) {
186
  'change-wp-admin-login-section'
187
  );
188
 
189
- register_setting( 'permalink','rwl_page_input', 'sanitize_title_with_dashes');
190
- register_setting( 'permalink','rwl_redirect_field', 'sanitize_title_with_dashes');
191
 
192
 
193
- if( isset( $_POST['rwl-page'] ) )
194
- {
195
- update_option( 'rwl-page', sanitize_title_with_dashes( $_POST['rwl-page'] ) );
196
- }
197
-
198
- if( isset( $_POST['rwl_redirect_field'] ) )
199
- {
200
- update_option( 'rwl_redirect_field', sanitize_title_with_dashes( $_POST['rwl_redirect_field'] ) );
201
- }
202
 
203
-
204
- if ( isset( $_POST['rwl_page'] ) ) {
205
  if (
206
  ( $rwl_page = sanitize_title_with_dashes( $_POST['rwl_page'] ) ) &&
207
  strpos( $rwl_page, 'wp-login' ) === false &&
@@ -215,6 +209,7 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Change_WP_Admin_Login' ) ) {
215
  }
216
  }
217
 
 
218
  if ( get_option( 'rwl_redirect' ) ) {
219
  delete_option( 'rwl_redirect' );
220
 
186
  'change-wp-admin-login-section'
187
  );
188
 
189
+ register_setting( 'permalink','rwl_page_input');
190
+ register_setting( 'permalink','rwl_redirect_field');
191
 
192
 
193
+ if( isset($_POST['permalink_structure']) && isset( $_POST['rwl_redirect_field'] ) ){
194
+ $short_domain = wp_unslash( $_POST['rwl_redirect_field'] );
195
+ update_option( 'rwl_redirect_field', $short_domain );
196
+ }
 
 
 
 
 
197
 
198
+ if( isset($_POST['permalink_structure']) && isset( $_POST['rwl_page'] ) ){
 
199
  if (
200
  ( $rwl_page = sanitize_title_with_dashes( $_POST['rwl_page'] ) ) &&
201
  strpos( $rwl_page, 'wp-login' ) === false &&
209
  }
210
  }
211
 
212
+
213
  if ( get_option( 'rwl_redirect' ) ) {
214
  delete_option( 'rwl_redirect' );
215
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Tags: change wp-login, rename wp-login, wp-admin, login, wp-login,
3
  Contributors: nunosarmento
4
  Requires at least: 4.4
5
  Tested up to: 6.0
6
- Stable tag: 1.0.8
7
  License: GPL-2.0+
8
 
9
 
@@ -99,4 +99,7 @@ No, BuddyPress has their own wp-admin redirect functions.
99
  * fix missing register_setting on the add_settings_field
100
 
101
  = 1.0.8 =
102
- * fix security issue
 
 
 
3
  Contributors: nunosarmento
4
  Requires at least: 4.4
5
  Tested up to: 6.0
6
+ Stable tag: 1.0.9
7
  License: GPL-2.0+
8
 
9
 
99
  * fix missing register_setting on the add_settings_field
100
 
101
  = 1.0.8 =
102
+ * fix security issue
103
+
104
+ = 1.0.9 =
105
+ * fix security issue