Repository navigation
Keep default form actions on the current origin - #48
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 1087 1087
===========================================
Files 119 119
Lines 2942 2946 +4
===========================================
+ Hits 2942 2946 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review this |
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. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
A request path such as
//evil.example/logincould produce a cross-origin default form action and expose submitted values and the CSRF token.Omit the
actionattribute when the URL is unset orfalse, so the browser submits to the current document. Sign the request URI's path and query directly, preserving leading double slashes without interpreting them as an external host. Explicit route arrays and URL strings continue through CakePHP routing.Regression tests exercise real CakePHP request creation, omitted action attributes, unchanged submission paths and query strings, CSRF preservation, wrong-target rejection, and hidden-value tampering. Update form and POST-link documentation to describe the default behavior.
Validation:
composer validate --strict, formatting, andcomposer check: 828 tests, 3,343 assertions; analysis, lint, Rector, and format check passed.npm ciandnpm run docs:buildpassed using an isolated Node 22 runtime.