Change wp-admin login - Version 1.0.8

Version Description

  • fix security issue
Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

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.7
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.8
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
@@ -162,10 +162,6 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Change_WP_Admin_Login' ) ) {
162
 
163
  public function admin_init() {
164
  global $pagenow;
165
- //
166
- // if ( ! current_user_can( 'manage_options' ) ) {
167
- // return;
168
- // }
169
 
170
  add_settings_section(
171
  'change-wp-admin-login-section',
@@ -194,11 +190,18 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Change_WP_Admin_Login' ) ) {
194
  register_setting( 'permalink','rwl_redirect_field', 'sanitize_title_with_dashes');
195
 
196
 
197
- if( isset( $_POST['rwl_redirect_field'] ) && $pagenow === 'options-permalink.php' ) {
 
 
 
 
 
 
198
  update_option( 'rwl_redirect_field', sanitize_title_with_dashes( $_POST['rwl_redirect_field'] ) );
199
  }
200
 
201
- if ( isset( $_POST['rwl_page'] ) && $pagenow === 'options-permalink.php' ) {
 
202
  if (
203
  ( $rwl_page = sanitize_title_with_dashes( $_POST['rwl_page'] ) ) &&
204
  strpos( $rwl_page, 'wp-login' ) === false &&
162
 
163
  public function admin_init() {
164
  global $pagenow;
 
 
 
 
165
 
166
  add_settings_section(
167
  'change-wp-admin-login-section',
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 &&
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.7
7
  License: GPL-2.0+
8
 
9
 
@@ -97,3 +97,6 @@ No, BuddyPress has their own wp-admin redirect functions.
97
 
98
  = 1.0.7 =
99
  * fix missing register_setting on the add_settings_field
 
 
 
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
 
97
 
98
  = 1.0.7 =
99
  * fix missing register_setting on the add_settings_field
100
+
101
+ = 1.0.8 =
102
+ * fix security issue