Sync edit-team template: scope the nonce to the submitted team id - #1408
Sync edit-team template: scope the nonce to the submitted team id#1408MILAN88888 wants to merge 2 commits into
Conversation
|
Build for ⬇️ Download user-registration-5.2.7.zip (8.1M) Installs directly via Plugins → Add New → Upload Plugin. |
|
@MILAN88888 Reviewed alongside the pro-side fix in wpeverest/user-registration-pro#1526 (closes wpeverest/user-registration-pro#1497). This change is correct and the blob matches the pro copy exactly ( One follow-up that belongs in this PR, because it only becomes true once the pro handler lands:
Everything else here matches the pro side. The |
…ture and drop dead AJAX-login code
…re and dedupe the redirect host
…s passes, not the current user
… after login (#1422) * #1408 Fix - Prevent membership privilege escalation and open redirect after login * #1408 Fix - Address Copilot review: document meta auth_callback signature and drop dead AJAX-login code * #1408 Fix - Match the meta auth_callback to WP's 6-arg filter signature and dedupe the redirect host * #1408 Fix - Evaluate the meta auth_callback against the user WordPress passes, not the current user * #1408 Fix - Reject a forged gateway on a free membership so it cannot take the paid order path
…t details (#1427) * #1408 Fix - Prevent membership privilege escalation and open redirect after login * #1408 Fix - Address Copilot review: document meta auth_callback signature and drop dead AJAX-login code * #1408 Fix - Match the meta auth_callback to WP's 6-arg filter signature and dedupe the redirect host * #1408 Fix - Evaluate the meta auth_callback against the user WordPress passes, not the current user * #1408 Fix - Reject a forged gateway on a free membership so it cannot take the paid order path * #1560 Fix - Prevent membership thank you page leaking another member's account details * #1560 Fix - Address Copilot review: defer_role by plan type, sanitize transaction_id, respect meta auth chain --------- Co-authored-by: milan88888 <chaudharymilan996@gmail.com>
All Submissions:
Changes proposed in this Pull Request:
This is the sync half of a security fix. The real fix lives in the Pro repo: wpeverest/user-registration-pro#1526 (Team Membership IDOR, wpeverest/user-registration-pro#1497).
templates/myaccount/edit-team.phpis byte-identical in this repo and in Pro, and it is kept in sync automatically. The Pro fix had to change that template, so the same changes have to land here too — otherwise the next sync would quietly revert them.What changed in the template:
wp_nonce_field( 'ur_edit_team_' . $team_id, ... )instead of one shared name for every team.$team_idis now run throughabsint(). This matters: it used to default to an empty string, which would have produced a nonce name ofur_edit_team_while the Pro handler expectsur_edit_team_0— a silent mismatch.members_idandmax_seatshidden inputs are removed. The Pro handler no longer reads either — the seat limit comes fromurm_team_seatsand the member IDs are resolved from the submitted emails — so leaving them in the form only invited someone to wire them back up.data-max-seatson the<form>. The frontend script readmax_seatsfor its client-side cap, so the value still has to reach the page; as an attribute it is available to the script but is not submitted.@versionbumped 1.0.0 → 1.0.1, as required when an overridable template changes.There is no behaviour change in this repo. The Team Membership feature is Pro-only, so nothing in this plugin reads this template today. This PR exists purely to keep the two copies identical.
How to test the changes in this Pull Request:
Types of changes:
Not breaking in this repo, since the template is unused here. It is a breaking change for Pro sites that override this template in their theme — see the note on wpeverest/user-registration-pro#1526.
Other information:
Verified the file is byte-identical to the Pro branch's copy (
cmpreports no differences) and passesphp -l. PHPCS shows no new violations, only removals — against theWordPressstandard, 13 ondevelopand 10 here; everything remaining pre-dates this PR. (Measured with theWordPressstandard rather than the project ruleset, which needsPHPCompatibilityandWPEverest-Coreinstalled; the earlier 14 → 13 figure in this PR's history came from the project ruleset, so the two counts are not comparable.)Merge order: this should land together with, or just after, wpeverest/user-registration-pro#1526 — on its own it does nothing.
Changelog entry