{"data":{"id":"magento2-38449","source":"github-pr","sourceRef":"magento/magento2#38449","title":"Fix issues with Customer Data when form contains element with name `method`","pr":{"number":38449,"url":"https://github.com/magento/magento2/pull/38449","author":"lbajsarowicz","mergedAt":"2024-05-16T19:44:51Z","mergeCommit":"76ee918c8cc0e4e850874fd1a2ac3f57dad4d0f8","headCommit":"bcb6fc6f5c2a3bac12a9ed5378b41952632d2081","baseRef":"2.4-develop","diffSha256":"2fa6a6ef16f530cc7b1234e7383bdbde7d1d9fde75418df6b69882dc7433e733"},"issues":[{"number":38484,"url":"https://github.com/magento/magento2/issues/38484","title":"[Issue] Fix issues with Customer Data when form contains element with name `method`","labels":["Area: Framework","Component: Frontend","Issue: Confirmed","Priority: P1","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x","Triage: Dev.Experience"],"kind":"pr-derived"}],"fixedIn":"2.4.8","containingTags":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5","2.4.9"],"reportedOn":null,"codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10"],"components":["magento/module-catalog","magento/module-customer"],"files":[{"path":"app/code/Magento/Catalog/view/frontend/web/js/storage-manager.js","change":"modified","package":"magento/module-catalog"},{"path":"app/code/Magento/Customer/view/frontend/web/js/customer-data.js","change":"modified","package":"magento/module-customer"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":4,"mergeBatched":false,"excluded":null,"sections":{"description":"The path to verify `<form method=\"\">` value in `customer-data.js` (`Magento_Customer`) is glitchy and when there's an element with `name=\"method\"` in the submitted form, the `event.target.method` refers to element, not attribute.","stepsToReproduce":"1. Open any form (e.g. Customer Registration form),\n2. Open Browser console and replace `name=\"\"` of any element (e.g. \"Remember me\") to `name=\"method\"`.\n3. Set breakpoint at `customer-data.min.js` line after `$(document).on('submit', function(event) {`. \n4. Expect that `if ()` section (1 line below) uses `<form method=\"\">`  - not just created element.","expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":["Framework"],"component":["Frontend"],"priority":"P1","severity":null,"reportedOn":["2.4.x"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"f8c54cf2bf33f794409ce05d982968a24f14758eaa2553b14209cd6ed26197f3","isBugfix":0.9767,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9738,"feature":0.0037,"refactor":0.0122,"tests_only":0.0038,"docs_only":0.0031,"dependency":0.0034},"confidence":0.9383},"scope":{"score":0.7177,"probabilities":{"0":0.4344,"1":0.4135,"2":0.1521},"confidence":0.0742},"risk":{"score":0.4124,"probabilities":{"0":0.6444,"1":0.2988,"2":0.0568},"confidence":0.2617},"area":{"choice":"frontend","probabilities":{"catalog":0.018,"checkout":0.0152,"customer":0.3928,"admin":0.0101,"graphql_api":0.003,"framework":0.0258,"frontend":0.5276,"other":0.0075},"confidence":0.3532},"securityRelevant":0.0495,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0037,"2.4.0-p1":0.0034,"2.4.1":0.0033,"2.4.1-p1":0.0031,"2.4.2":0.0048,"2.4.2-p1":0.0044,"2.4.2-p2":0.0056,"2.4.3":0.0081,"2.4.3-p1":0.0093,"2.4.3-p2":0.0093,"2.4.3-p3":0.0057,"2.4.4":0.0097,"2.4.4-p1":0.0076,"2.4.4-p10":0.0065,"2.4.4-p11":0.0065,"2.4.4-p12":0.0062,"2.4.4-p13":0.006,"2.4.4-p14":0.0075,"2.4.4-p15":0.0056,"2.4.4-p16":0.0068,"2.4.4-p17":0.0056,"2.4.4-p18":0.005,"2.4.4-p2":0.0028,"2.4.4-p3":0.0031,"2.4.4-p4":0.0033,"2.4.4-p5":0.0038,"2.4.4-p6":0.0047,"2.4.4-p7":0.004,"2.4.4-p8":0.0044,"2.4.4-p9":0.0045,"2.4.5":0.0139,"2.4.5-p1":0.0114,"2.4.5-p10":0.0083,"2.4.5-p11":0.0125,"2.4.5-p12":0.01,"2.4.5-p13":0.0093,"2.4.5-p14":0.0096,"2.4.5-p15":0.0073,"2.4.5-p16":0.0088,"2.4.5-p17":0.0078,"2.4.5-p2":0.0042,"2.4.5-p3":0.0056,"2.4.5-p4":0.0061,"2.4.5-p5":0.0058,"2.4.5-p6":0.0069,"2.4.5-p7":0.0073,"2.4.5-p8":0.0056,"2.4.5-p9":0.0059,"2.4.6":0.034,"2.4.6-p1":0.0228,"2.4.6-p10":0.0121,"2.4.6-p11":0.0136,"2.4.6-p12":0.0125,"2.4.6-p13":0.0112,"2.4.6-p14":0.0108,"2.4.6-p15":0.0081,"2.4.6-p2":0.0047,"2.4.6-p3":0.0081,"2.4.6-p4":0.0085,"2.4.6-p5":0.0071,"2.4.6-p6":0.0116,"2.4.6-p7":0.0081,"2.4.6-p8":0.0063,"2.4.6-p9":0.0068,"2.4.7":0.0201,"2.4.7-p1":0.018,"2.4.7-p10":0.0089,"2.4.7-p2":0.008,"2.4.7-p3":0.0133,"2.4.7-p4":0.0155,"2.4.7-p5":0.0133,"2.4.7-p6":0.013,"2.4.7-p7":0.0142,"2.4.7-p8":0.0102,"2.4.7-p9":0.0084,"2.4.8":0.0202,"2.4.8-p1":0.02,"2.4.8-p2":0.0206,"2.4.8-p3":0.0184,"2.4.8-p4":0.0175,"2.4.8-p5":0.0145,"2.4.9":0.0217,"unspecified":0.2273},"confidence":0.0501},"backportWorthy":{"score":1.5722,"probabilities":{"0":0.0915,"1":0.2448,"2":0.6637},"confidence":0.2632}},"curated":{"title":"Form method attribute is not used when a form has an element with name method","description":"When a submitted form has an element with name=\"method\", event.target.method refers to that element, not to the form method attribute, in customer-data.js and the Catalog storage-manager.js. Both now use getAttribute('method') and match post|put|delete only when the form hasAttribute('method').","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-38449 details"}