Repository navigation
Reject button names that unlock protected fields - #50
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 1089 1099 +10
===========================================
Files 119 120 +1
Lines 2949 2974 +25
===========================================
+ Hits 2949 2974 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d80953fdcb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Rendering a hidden
record.id=42with a submit button namedidpreviously allowedrecord.id=999through CakePHP's form protection because unlocked names match path segments.Collect enabled submit-button names separately from explicit unlocks. Before generating tokens, reject names overlapping protected submissions or form infrastructure, regardless of rendering order. Reset buttons, ordinary buttons, and disabled submit buttons do not register optional names or participate in overlap validation. Normalize nested submit names for CakePHP's optional-name matching.
Stage button registrations alongside inputs and restore them when an enclosing render fails, so catching an exception and continuing the same form cannot retain discarded optional names.
Regression tests cover protected and infrastructure name overlaps, both rendering orders, non-submitting controls sharing those names, legitimate optional buttons, hidden-value tampering, unprotected forms, failed custom renderers, and nested rollback/retry behavior.
Validation:
composer validate --strict, formatting, andcomposer checkpassed: 865 tests, 3,523 assertions; analysis, lint, Rector, and format check clean. Xdebug Clover coverage: 100% (2,546/2,546 lines); greater-than-90% gate passed.