New User Approve - Version 2.4.1-beta

Version Description

= 1.5.3 = Download version 1.5.3 immediately! Some bugs have been fixed that have been affecting how the plugin worked.

= 1.5 = A long awaited upgrade that includes better integration with WordPress core. Requires at least WordPress 3.5.

= 1.3 = This version fixes some issues when authenticating users. Requires at least WordPress 3.1.

= 1.3.1 = Download version 1.3.1 immediately! A bug was found in version 1.3 that allows a user to login without using password.

= 1.3.2 = Download version 1.3.2 immediately! A bug was found in version 1.3 that allows a user to login using any password.

Download this release

Release Info

Developer wpexpertsio
Plugin Icon 128x128 New User Approve
Version 2.4.1-beta
Comparing to
See all releases

Code changes from version 2.4 to 2.4.1-beta

admin/templates/image/new-user-logo.png ADDED
Binary file
admin/templates/upgrade.php CHANGED
@@ -940,7 +940,7 @@ jQuery(document).ready(function($){
940
 
941
  });
942
 
943
-
944
  function buy_now(selected_plan_id, selected_billing_cycle, licenses) {
945
 
946
  var handler = FS.Checkout.configure({
@@ -948,7 +948,7 @@ function buy_now(selected_plan_id, selected_billing_cycle, licenses) {
948
  plugin_id: '5930',
949
  plan_id: selected_plan_id,
950
  public_key: 'pk_4c854593bf607fd795264061bbf57',
951
- image: 'https://newuserapprove.com/wp-content/uploads/2020/09/cropped-new-user-logo_2c24dec67c275b6b862d7d7e1eb472e3.png',
952
  billing_cycle: selected_billing_cycle
953
 
954
  });
@@ -957,7 +957,7 @@ function buy_now(selected_plan_id, selected_billing_cycle, licenses) {
957
  var plugin_id= '5930';
958
  var plan_id= selected_plan_id;
959
  var public_key= 'pk_4c854593bf607fd795264061bbf57';
960
- var image= 'https://newuserapprove.com/wp-content/uploads/2020/09/cropped-new-user-logo_2c24dec67c275b6b862d7d7e1eb472e3.png';
961
  var billing_cycle= selected_billing_cycle;
962
  handler.open({
963
 
940
 
941
  });
942
 
943
+ var new_user_approve_logo = url("./image/new-user-logo.png");
944
  function buy_now(selected_plan_id, selected_billing_cycle, licenses) {
945
 
946
  var handler = FS.Checkout.configure({
948
  plugin_id: '5930',
949
  plan_id: selected_plan_id,
950
  public_key: 'pk_4c854593bf607fd795264061bbf57',
951
+ image: new_user_approve_logo,
952
  billing_cycle: selected_billing_cycle
953
 
954
  });
957
  var plugin_id= '5930';
958
  var plan_id= selected_plan_id;
959
  var public_key= 'pk_4c854593bf607fd795264061bbf57';
960
+ var image= new_user_approve_logo;
961
  var billing_cycle= selected_billing_cycle;
962
  handler.open({
963
 
includes/admin-approve.php CHANGED
@@ -257,7 +257,7 @@ $row++;
257
  if (!get_user_meta($user_id, 'pw_new_user_approve_ignore_notice')) {
258
  ?>
259
  <div class="updated"><p>
260
- <?php printf(wp_kses_post(__('You can now update user status on the <a href="%1$s">users admin page</a>. | <a href="%2$s">Hide Notice</a>', 'new-user-approve'), admin_url('users.php'), add_query_arg(array('new-user-approve-ignore-notice' => 1))));?>
261
  </p></div>
262
  <?php
263
  }
257
  if (!get_user_meta($user_id, 'pw_new_user_approve_ignore_notice')) {
258
  ?>
259
  <div class="updated"><p>
260
+ <?php printf(wp_kses_post(__('You can now update user status on the <a href="%1$s">users admin page</a>. | <a href="%2$s">Hide Notice</a>', 'new-user-approve'), admin_url('users.php'), esc_url( add_query_arg(array('new-user-approve-ignore-notice' => 1)))));?>
261
  </p></div>
262
  <?php
263
  }
includes/user-list.php CHANGED
@@ -49,14 +49,14 @@ class pw_new_user_approve_user_list {
49
  if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'approve', 'deny' ) ) && !isset( $_GET['new_role'] ) ) {
50
  check_admin_referer( 'new-user-approve' );
51
 
52
- $sendback = remove_query_arg( array( 'approved', 'denied', 'deleted', 'ids', 'pw-status-query-submit', 'new_role' ), wp_get_referer() );
53
  if ( !$sendback )
54
  $sendback = admin_url( 'users.php' );
55
 
56
  $wp_list_table = _get_list_table( 'WP_Users_List_Table' );
57
 
58
  $pagenum = $wp_list_table->get_pagenum();
59
- $sendback = add_query_arg( 'paged', $pagenum, $sendback );
60
 
61
  $status = ( !empty( $_GET['action']) ) ? sanitize_key( $_GET['action'] ): '';
62
  $user = ( !empty( $_GET['user'] ) ) ? absint( wp_unslash($_GET['user'] ) ) :'';
@@ -64,9 +64,9 @@ class pw_new_user_approve_user_list {
64
  pw_new_user_approve()->update_user_status( $user, $status );
65
 
66
  if ( $_GET['action'] == 'approve' ) {
67
- $sendback = add_query_arg( array( 'approved' => 1, 'ids' => $user ), $sendback );
68
  } else {
69
- $sendback = add_query_arg( array( 'denied' => 1, 'ids' => $user ), $sendback );
70
  }
71
 
72
  wp_redirect( $sendback );
@@ -330,7 +330,7 @@ class pw_new_user_approve_user_list {
330
 
331
  $sendback = remove_query_arg( array( 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback );
332
 
333
- wp_redirect( $sendback );
334
  exit();
335
  }
336
  }
49
  if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'approve', 'deny' ) ) && !isset( $_GET['new_role'] ) ) {
50
  check_admin_referer( 'new-user-approve' );
51
 
52
+ $sendback = esc_url( remove_query_arg( array( 'approved', 'denied', 'deleted', 'ids', 'pw-status-query-submit', 'new_role' ), wp_get_referer() ));
53
  if ( !$sendback )
54
  $sendback = admin_url( 'users.php' );
55
 
56
  $wp_list_table = _get_list_table( 'WP_Users_List_Table' );
57
 
58
  $pagenum = $wp_list_table->get_pagenum();
59
+ $sendback = esc_url( add_query_arg( 'paged', $pagenum, $sendback ));
60
 
61
  $status = ( !empty( $_GET['action']) ) ? sanitize_key( $_GET['action'] ): '';
62
  $user = ( !empty( $_GET['user'] ) ) ? absint( wp_unslash($_GET['user'] ) ) :'';
64
  pw_new_user_approve()->update_user_status( $user, $status );
65
 
66
  if ( $_GET['action'] == 'approve' ) {
67
+ $sendback = esc_url( add_query_arg( array( 'approved' => 1, 'ids' => $user ), $sendback )) ;
68
  } else {
69
+ $sendback = esc_url( add_query_arg( array( 'denied' => 1, 'ids' => $user ), $sendback ));
70
  }
71
 
72
  wp_redirect( $sendback );
330
 
331
  $sendback = remove_query_arg( array( 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback );
332
 
333
+ wp_redirect( esc_url($sendback) );
334
  exit();
335
  }
336
  }
new-user-approve.php CHANGED
@@ -5,14 +5,14 @@
5
  Plugin URI: http://newuserapprove.com/
6
  Description: Allow administrators to approve users once they register. Only approved users will be allowed to access the site. For support, please go to the <a href="http://wordpress.org/support/plugin/new-user-approve">support forums</a> on wordpress.org.
7
  Author: NewUserApprove
8
- Version: 2.4
9
  Author URI: https://newuserapprove.com/
10
  Text Domain: new-user-approve
11
  */
12
 
13
 
14
  if ( !defined( 'NUA_VERSION' ) ) {
15
- define( 'NUA_VERSION', '2.4' );
16
  }
17
 
18
  if ( !function_exists( 'nua_fs' ) ) {
@@ -767,16 +767,16 @@ class pw_new_user_approve
767
  {
768
  $nonce = '';
769
  if ( wp_verify_nonce($nonce) ) {return;}
770
-
771
- if ( !empty($_POST['redirect_to']) ) {
772
  // if a redirect_to is set, honor it
773
  wp_safe_redirect( wp_unslash($_POST['redirect_to'] ));
774
  exit;
775
  }
776
 
777
  // if there is an error already, let it do it's thing
778
- if ( $errors->get_error_code() ) {
779
- return $errors;
780
  }
781
  $message = nua_default_registration_complete_message();
782
  $message = nua_do_email_tags( $message, array(
5
  Plugin URI: http://newuserapprove.com/
6
  Description: Allow administrators to approve users once they register. Only approved users will be allowed to access the site. For support, please go to the <a href="http://wordpress.org/support/plugin/new-user-approve">support forums</a> on wordpress.org.
7
  Author: NewUserApprove
8
+ Version: 2.4.1
9
  Author URI: https://newuserapprove.com/
10
  Text Domain: new-user-approve
11
  */
12
 
13
 
14
  if ( !defined( 'NUA_VERSION' ) ) {
15
+ define( 'NUA_VERSION', '2.4.1' );
16
  }
17
 
18
  if ( !function_exists( 'nua_fs' ) ) {
767
  {
768
  $nonce = '';
769
  if ( wp_verify_nonce($nonce) ) {return;}
770
+ $disable_redirect = apply_filters( 'nua_disable_redirect_to_field', false );
771
+ if ( !empty($_POST['redirect_to']) && false === $disable_redirect ) {
772
  // if a redirect_to is set, honor it
773
  wp_safe_redirect( wp_unslash($_POST['redirect_to'] ));
774
  exit;
775
  }
776
 
777
  // if there is an error already, let it do it's thing
778
+ if ( !empty($errors) && is_wp_error($errors) && $errors->get_error_code() ) {
779
+ return $errors;
780
  }
781
  $message = nua_default_registration_complete_message();
782
  $message = nua_do_email_tags( $message, array(
readme.txt CHANGED
@@ -193,8 +193,11 @@ We are aware of a few issues with multisite
193
 
194
  == Changelog ==
195
 
 
 
 
196
  = 2.4 =
197
- * Tweak - Code improvement
198
 
199
  = 2.3 =
200
  * Added - Zapier Integration
193
 
194
  == Changelog ==
195
 
196
+ = 2.4.1 =
197
+ * Tweak – Security Fixes
198
+
199
  = 2.4 =
200
+ * Tweak Code improvement
201
 
202
  = 2.3 =
203
  * Added - Zapier Integration