-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: FrameworkComponent: BackendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Description
When sending data
JSON.stringify({
...
form_key: form_key
...
})
in 'mage/storage'.post(url, data) to the REST endpoint
the form_key isn't found because it is searching for 'form_key=' and not 'form_key'
settings.data.indexOf('form_key=') === -1) { |
and it is adding to the encoded json string '{}'&form_key=xyz
, what makes an exception in
[64 line] \Magento\Framework\Webapi\Rest\Request\Deserializer\decodedBody
To bypass this I have added in data
JSON.stringify({
...
'form_key=': form_key
...
})
is there a reason why in
lib/web/mage/backend/bootstrap.js#L46 it is comparing 'form_key=' and not just 'form_key'?
Metadata
Metadata
Assignees
Labels
Area: FrameworkComponent: BackendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it