Skip to content

REST API unable to make requests with slash (/) in SKU #8615

Closed
@mplccp

Description

@mplccp

Inside the REST API, it is impossible to access a resource that requires an SKU if the SKU contains a forward slash.

Preconditions

  1. Tested in CE 2.1.2 and CE 2.1.3. No indication of fix in 2.1.4 release notes

Steps to reproduce

  1. Fresh install
  2. Create product (of any type) with SKU containing /, e.g. "CLE-056621/6"
  3. Make REST request with encoded SKU (as Swagger does) e.g. "V1/products/CLE-056621%2F6", "/V1/products/CLE-056621%2F6/media"

Expected result

  1. Should be possible to make a request with encoded SKU, or by product ID

Actual result

  1. A request with a slash ("CLE-056621/6") returns "Not found" 404
  2. A request with encoded SKU ("CLE-056621%2F6") returns
    { "message": "Requested product doesn't exist" }

Metadata

Metadata

Assignees

Labels

Component: Framework/WebapiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: 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 developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions