Skip to content

Web Api to create customer don't validate payload data and create corrupted record #28064

Closed
@GDauer

Description

@GDauer

Preconditions (*)

  1. Magento 2.3.3
  2. PHP 7.2.22
  3. nginx/1.10.3

Steps to reproduce (*)

  1. Send a post request to the endpoint /rest/V1/customers
  2. In the payload send an invalid group_id (by default Magento has the ids: 0, 1, 2, 3)
  3. (optional) Another strange thing is that we can send the request to create a customer without password and the api creates the register.
  4. Example of Request:
    CreateCustomerBug

Expected result (*)

  1. Should throws an Exception informing that the group_id are not found

Actual result (*)

  1. It's creates the client record successfully
  2. The client can't see products or add products to the quote
  3. https://www.loom.com/share/bf9c71c78bd6427b9537285c6064eb80

Metadata

Metadata

Labels

Component: CustomerComponent: WebapiUse with concrete module component label E.g. "Component: Webapi" + "Catalog"Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.3.3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions