Skip to content

Commit 68beb46

Browse files
authored
Merge pull request #863 from wpdev10/master
check for nonce while changing user type for bulk users
2 parents 6c103c9 + 9c9cea3 commit 68beb46

8 files changed

Lines changed: 31 additions & 14 deletions

File tree

admin/class-admin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,14 @@ public function handle_bulk_user_type_change() {
13261326
return;
13271327
}
13281328

1329+
if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'bulk-users' ) ) {
1330+
wp_die( __( 'Security check failed. Please try again.' ) );
1331+
}
1332+
1333+
if ( ! current_user_can( 'edit_users' ) ) {
1334+
wp_die( __( 'You do not have permission to perform this action.' ) );
1335+
}
1336+
13291337
$new_user_type = absint( $_GET['uwp_new_user_type'] );
13301338

13311339
if ( ! $new_user_type ) {

admin/settings/class-formbuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ public function create_field() {
25522552
$tags = '';
25532553
}
25542554

2555-
if ( $tags != 'skip_field' ) {
2555+
if ( $tags != 'skip_field' && !empty( $_REQUEST[ $pkey ] ) ) {
25562556
$_REQUEST[ $pkey ] = strip_tags( $_REQUEST[ $pkey ], $tags );
25572557
}
25582558
}

includes/class-forms.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ public function display_notices( $type ) {
468468
} elseif ( ! empty( $notice ) ) {
469469
echo wp_kses_post( $notice );
470470
}
471-
}
472-
}
471+
}
472+
}
473473

474474
if ( $type == 'change' ) {
475475
$user_id = get_current_user_id();

languages/userswp-en_US.mo

2 Bytes
Binary file not shown.

languages/userswp-en_US.po

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
msgid ""
22
msgstr ""
3-
"Project-Id-Version: UsersWP 1.2.47\n"
3+
"Project-Id-Version: UsersWP 1.2.48\n"
44
"Report-Msgid-Bugs-To: \n"
5-
"POT-Creation-Date: 2025-10-31 11:19+0530\n"
6-
"PO-Revision-Date: 2025-10-31 11:19+0530\n"
5+
"POT-Creation-Date: 2025-11-12 16:42+0530\n"
6+
"PO-Revision-Date: 2025-11-12 16:42+0530\n"
77
"Last-Translator: \n"
88
"Language-Team: AyeCode Ltd <contact@ayecode.io>\n"
99
"Language: en_US\n"
@@ -15,7 +15,7 @@ msgstr ""
1515
"_nx:1,2;_x;_ex;esc_attr_e;esc_attr__\n"
1616
"X-Poedit-Basepath: ..\n"
1717
"X-Poedit-SourceCharset: UTF-8\n"
18-
"X-Generator: Poedit 3.5\n"
18+
"X-Generator: Poedit 3.3.2\n"
1919
"X-Poedit-SearchPath-0: .\n"
2020
"X-Poedit-SearchPathExcluded-0: vendor\n"
2121

@@ -303,7 +303,7 @@ msgstr ""
303303
msgid "Form %d"
304304
msgstr ""
305305

306-
#: admin/class-admin.php:1033
306+
#: admin/class-admin.php:1033 admin/class-admin.php:1334
307307
msgid "You do not have permission to perform this action."
308308
msgstr ""
309309

@@ -328,6 +328,10 @@ msgstr ""
328328
msgid "Change"
329329
msgstr ""
330330

331+
#: admin/class-admin.php:1330
332+
msgid "Security check failed. Please try again."
333+
msgstr ""
334+
331335
#: admin/class-uwp-admin-help.php:38
332336
msgid "Help &amp; Support"
333337
msgstr ""

readme.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Contributors: stiofansisland, paoltaia, ayecode, ismiaini
33
Donate link: https://www.ko-fi.com/stiofan
44
Tags: login form, registration, registration form, user profile, user registration, members, membership
5-
Requires at least: 5.0
5+
Requires at least: 6.1
66
Tested up to: 6.8
7-
Stable tag: 1.2.47
7+
Stable tag: 1.2.48
88
License: GPLv3
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -90,6 +90,8 @@ UsersWP can be extended with several add-ons. Few examples are:
9090
* [User to User Private Messages](https://userswp.io/downloads/private-messages/) - Allow your users to send each other private messages in a Facebook-like chat.
9191
* [Membership](https://userswp.io/downloads/membership-plugin/) - Add Membership functionality to your WordPress website!
9292
* [Dashboard](https://userswp.io/downloads/dashboard/) - Manage everything from one simple, easy-to-use dashboard.
93+
* [MailerLite](https://userswp.io/downloads/mailerlite/) - Capture newsletter subscribers during registration to your mailerlite newsletter list.
94+
* [MailPoet](https://userswp.io/downloads/mailpoet/) - Capture newsletter subscribers during registration to your mailpoet newsletter list.
9395

9496
There are many others and we release new Add-ons frequently. You can see the full collection here: [UsersWP Premium Add-ons](https://userswp.io/downloads/category/addons/)
9597

@@ -150,6 +152,9 @@ Yes, you can customize it with Elementor, but also with Gutenberg, Divi, Beaver
150152

151153
== Changelog ==
152154

155+
= 1.2.48 - 2025-11-12 =
156+
* Check nonce while changing the user type for bulk users - FIXED/SECURITY
157+
153158
= 1.2.47 - 2025-10-31 =
154159
* Merge SD 1.2.29 - CHANGED
155160

userswp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: UsersWP
44
Plugin URI: https://userswp.io/
55
Description: The only lightweight user profile plugin for WordPress. UsersWP features front end user profile, users directory, a registration and a login form.
6-
Version: 1.2.47
6+
Version: 1.2.48
77
Author: AyeCode Ltd
88
Author URI: https://userswp.io
99
License: GPL-2.0+
@@ -24,7 +24,7 @@
2424
}
2525

2626
if ( ! defined( 'USERSWP_VERSION' ) ) {
27-
define( 'USERSWP_VERSION', '1.2.47' );
27+
define( 'USERSWP_VERSION', '1.2.48' );
2828
}
2929

3030
if ( ! defined( 'USERSWP_PATH' ) ) {

vendor/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => 'uswerwp/userswp',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'd13ebfa8745b6ed3d47b0aecbd0a5c714e7cfe8f',
6+
'reference' => '619a2da9b81f24569354f02c393faca03b26ffc0',
77
'type' => 'project',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -79,7 +79,7 @@
7979
'uswerwp/userswp' => array(
8080
'pretty_version' => 'dev-master',
8181
'version' => 'dev-master',
82-
'reference' => 'd13ebfa8745b6ed3d47b0aecbd0a5c714e7cfe8f',
82+
'reference' => '619a2da9b81f24569354f02c393faca03b26ffc0',
8383
'type' => 'project',
8484
'install_path' => __DIR__ . '/../../',
8585
'aliases' => array(),

0 commit comments

Comments
 (0)