Ticket #6662 (closed defect (bug): fixed)
Users without capability "create_users" can add new users
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 2.5.1 |
| Component: | Security | Version: | 2.5 |
| Severity: | critical | Keywords: | |
| Cc: |
Description
If a user has the capability "edit_users" and not the capability "create_users" he can add new users. The defect is in admin-ajax.php. The check is against "edit_users" and not "create_users". I've attached a patch to fix this issue. A second one - more an AddOn and not an defect: We should show the add user form only if the current user has the capability to add a new user. If the current user has the capability "create_users" the form will be shown. The second patch I attached make this job.
Attachments
Change History
imwebgefunden — 4 years ago
-
attachment
ajax_create_users.diff
added
imwebgefunden — 4 years ago
-
attachment
hide_create_user_form.diff
added
Show "Add User" Form only if the current user can create new users
- Status changed from new to closed
- Resolution set to fixed
Note: See
TracTickets for help on using
tickets.

Patch for admin-ajax.php to check against "create_users"