# UserPro (5.1.10)

`meteorgpl-plugin/userpro` — a WordPress plugin as a Composer package.

The ultimate user profiles and community plugin for WordPress.

- Author: Deluxe Themes — http://codecanyon.net/user/DeluxeThemes/portfolio?ref=DeluxeThemes
- Homepage: http://codecanyon.net/user/DeluxeThemes/portfolio?ref=DeluxeThemes
- License: not declared
- Buy a license from the vendor: https://themeforest.net/item/userpro-user-profiles-with-social-login/5958681
- Page: https://meteorgpl.com/packages/meteorgpl-plugin/userpro
- Translations: ar_AR, de_DE, en_US, es_ES, fr_FR, nl_NL, pl_PL, pt_BR, ro_RO, ru_RU, tr_TR, vi_VN, zh_CN, zh_TW
- Vendor: Deluxe Themes — https://meteorgpl.com/vendors/envato:deluxethemes

## Changelog

### 5.1.17 — 2026-11-10

==================================
 - Fix: reCAPTCHA v2 field showed only its label on the registration,
   login and edit forms, with no "I'm not a robot" widget.
   Three separate causes, all fixed:
   (1) admin/admin-functions.php printed the site key twice for the same
       field on the Groups & Fields screen, once as a text input and again
       as a hidden input holding the previously saved value. The hidden
       copy came later in the form, so saving the group always overwrote
       the key the administrator had just typed with the old (usually
       empty) one. The key could never be saved from that screen.
   (2) functions/fields-functions.php printed the site key into an
       unquoted HTML attribute (data-sitekey=VALUE). An empty key, or a
       key pasted with a leading or trailing space, produced invalid
       markup and Google rendered nothing. The value is now quoted and
       escaped, whitespace is trimmed, and when no key is stored an
       explanatory notice is shown to administrators only, in place of
       the blank space.
   (3) the widget relied on Google's automatic rendering with a copy of
       api.js printed per field. It is now loaded once per page in
       explicit-render mode, so the widget also appears on forms loaded
       by ajax and on pages where another plugin has already loaded
       api.js. Containers another plugin has already rendered into are
       left alone.
 - Fix: the "Please confirm the Captcha." error was never displayed
   unless the reCAPTCHA field happened to use the meta key "recaptcha".
   The error is now keyed on the field's own meta key, and the field
   carries an element for the message to attach to, so submitting the
   form without ticking the box now shows the error next to the widget
   instead of failing silently.
 - Fix: a newly created reCAPTCHA field now shows its Site Key box
   immediately, instead of only after the Fields screen is reloaded.

==================================

### 5.1.16 — 2026-10-06

==================================
 - Security fix: Privilege escalation (CVSS 9.8, unauthenticated).
   A guest registration could overwrite the new account's wp_capabilities
   row by posting a field name containing a Unicode homoglyph in place of an
   ASCII letter (e.g. U+0209 replacing 'i' in wp_capabilities). MySQL's
   accent-insensitive meta_key collation matched the mutated key to the real
   wp_capabilities row, and the previous remove_accents() denylist did not
   cover all characters in that equivalence class.
   Fixed in two layers:
   (1) functions/ajax.php now applies sanitize_key() to every POST key when
       building the form array, stripping all non-ASCII bytes before they
       reach update_user_meta().
   (2) functions/user-functions.php now rejects any meta key containing
       non-ASCII bytes outright and uses sanitize_key() rather than
       remove_accents() for the capabilities/user_level denylist, as
       defense-in-depth for any caller that does not go through ajax.php.
   Reported by YC_Infosec via Patchstack, 2026-10-06.

==================================

### 5.1.15 — 2026-10-02

==================================
 - Stability fix: PHP warning "Attempt to read property 'post_name' on null"
   on archive pages, 404s, and any non-single-post context. get_post() returns
   null on these pages; the userpro_title_tag filter was reading
   $post->post_name without a null guard, emitting the warning in the site
   header whenever UserPro was active but no post was in context.
   (functions/hooks-actions.php)

==================================

### 5.1.14 — 2026-09-12

==================================
 - Performance fix: member directory custom-field sort now sorts and paginates
   in the database query (meta_key + orderby=meta_value). Previously every
   matching user was fetched, sorted in PHP, then sliced, and the pagination
   total was miscalculated (page links ran to hundreds of empty pages).
 - Stability fix: member directory now survives malformed page/search input.
   ?userp=abc, ?userp[]=1 and ?searchuser[]=x previously caused a PHP 8 fatal
   (500); ?userp=-1 produced a negative SQL LIMIT. Page numbers are now cast
   with absint() and a non-string search is ignored. Same absint() guard
   applied to the Enhanced Member Directory / collage emd-page parameter.
 - Performance fix: Enhanced Member Directory and collage now count matches with
   a single COUNT query instead of fetching every matching user to count() them
   (same fix already applied to the core member directory).
 - Performance fix: userpro_badges_admin_users() is now capped at 500 rows via
   the userpro_badges_admin_users_limit filter (previously fetched every
   account on the site). Full user objects are kept so the badge user
   dropdowns still show email addresses and load in a handful of queries.
 - Removed dead get_pending_verify_requests_count() function from admin/admin.php
   (zero callers; duplicate of the patched function in the requests addon).
 - Security fix: SQL injection in the front-end post publish flow. The lookup
   query in the 'publish' AJAX action concatenated post_content (which passes
   through wp_kses without escaping quotes) into raw SQL; now uses
   $wpdb->prepare(). Reachable by any logged-in user.
 - Security fix: privilege/trust meta can no longer be set through a self-service
   profile save. A denylist (filter: userpro_protected_profile_meta) blocks
   userpro_verified, account status, connection lists, secret key, badge and
   social-id meta from the profile-edit POST for non-admins. Previously any
   logged-in user could set userpro_verified=1 on their own account.
 - Security fix: the role-change guard in userpro_update_user_profile() used
   is_admin(), which is always true during admin-ajax, so it never fired. Role
   changes via profile save now require the promote_users capability.
 - Security fix: userpro_crop_picupload AJAX action now requires a valid nonce
   (previously none) and escapes the file link it returns (reflected XSS via the
   src parameter).
 - Security fix: SQL injection in the badges comment-count query
   (count_user_comments) now uses $wpdb->prepare() with an integer cast.
 - Security fix: social follow/unfollow AJAX now requires login and always uses
   the current user as the follower (previously the follower id was taken from
   the request, letting anyone forge follow relationships between any users).
 - Hardening: user_id in the display-badges and post-sort AJAX actions is cast
   with absint().
 - Security fix: userpro_reset_option and userpro_user_invite AJAX actions now
   require the manage_options capability. Both were registered for logged-out
   users and gated by the public nonce only, so any visitor could reset all
   plugin settings or send invitation emails to arbitrary addresses.
 - Security fix: the protected-profile-meta check is now case-insensitive, so
   variants like Userpro_Verified can no longer slip a value into the real
   (case-insensitively matched) meta row.
 - Fix: the profile picture/file crop AJAX now receives the security nonce from
   the front-end script, so uploads keep working with the new nonce check.
 - Fix: the legacy userpro_sc_follow / userpro_sc_unfollow AJAX actions called a
   non-existent method and fataled on every request; they now use the same
   follow API as the current handler (and still force the follower to the
   logged-in user).
 - Fix: UserPro admin screen now shows the correct version number (was stuck
   at 5.1.11).
 - Fix: restored bundled cacert.pem files (Campaign Monitor, Twitter libs) and
   corrected the package folder name to "userpro" so uploads replace the
   existing plugin instead of installing a second copy.

==================================

==================================

### 5.1.13 — 2026-08-14

==================================
 - Performance fix: memberlist pagination now applies to custom-field sort keys
   (previously number/offset were only set for built-in sort keys, leaving
   custom-field-sorted member directories completely unbounded).
 - Performance fix: member directory search/filter total-count now uses a single
   COUNT query instead of fetching up to 10,000 full user records.
 - Performance fix: userpro_badges_admin_users() now fetches only ID and
   user_login, capped at 500 rows via the userpro_badges_admin_users_limit
   filter (previously fetched full WP_User objects for every account).
 - Performance fix: "Delete badge from all users" now fetches only user IDs
   before the per-user write loop (previously hydrated full WP_User objects).
 - Performance fix: User Requests admin panels (both old and new) now use a
   COUNT query for the pending-user header badges and cap the display list at
   200 rows (previously fetched all pending users unbounded).
 - Removed dead get_pending_verify_requests_count() function from admin/admin.php
   (zero callers; duplicate of the patched function in the requests addon).

==================================

==================================

Full changelog: https://meteorgpl.com/packages/meteorgpl-plugin/userpro/changelog

## Install

```sh
composer config repositories.meteorgpl composer https://composer.meteorgpl.com
composer require meteorgpl-plugin/userpro
```

The repository needs a token (see https://meteorgpl.com/docs). The vendor's license checks are intact: activate the plugin in WordPress with a key bought from the vendor.

## Versions

No version has been published yet.

