Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
manhao-chen opened this issue Jan 24, 2018 · 7 comments
Closed

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

manhao-chen opened this issue Jan 24, 2018 · 7 comments
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@manhao-chen
Copy link

manhao-chen commented Jan 24, 2018

as reported with #8615

Preconditions

  1. Tested in CE 2.2.2

Steps to reproduce

Fresh install
Create product (of any type) with SKU containing /, e.g. "ELEVATOR_HEADS-5/0 1oz-Orange"

searching for the product with
GET : /rest/v1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=ELEVATOR_HEADS-5%2F0%201oz-Orange
returns results as expected

but when getting the stockItems with the following
GET : /rest/V1/stockItems/ELEVATOR_HEADS-5%2F0+1oz-Orange
result 404 status - BUT the actual data is returned?

when trying to update the stockItem
PUT : /rest/V1/products/ELEVATOR_HEADS-5%2F0+1oz-Orange/stockItems/100
result : 404 status - message=Request does not match any route.

Expected result

expect
/rest/V1/stockItems/[sku containing / to also work]
/rest/V1/products/[sku containing / to also work]/stockItems/[stockItemID]

both to work in the same manner as sku without '/'

Actual result

GET : /rest/V1/stockItems/ELEVATOR_HEADS-5%2F0+1oz-Orange
result 404 status - BUT the actual data is returned?

PUT : /rest/V1/products/ELEVATOR_HEADS-5%2F0+1oz-Orange/stockItems/100
result : 404 status - message=Request does not match any route.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Jan 24, 2018
@magento-engcom-team
Copy link
Contributor

@manhao-chen, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jan 25, 2018
@Arhimenrius
Copy link

Arhimenrius commented Feb 3, 2018

To be honest, the problem is not with code but with server config. Servers by default block possibility to send even encoded slash as part of url (but not in case of param).

Solution for Apache might be AllowEncodedSlashes
In case of Nginx, proxy_pass

@ksiamro
Copy link

ksiamro commented Oct 1, 2018

@Arhimenrius
Solution with AllowEncodedSlashes works great.

Thanks ;)

@irajneeshgupta
Copy link
Member

@magento-engcom-team @engcom-backlog-nazar I think its not a issue. Can you please review and close?

@ghost ghost self-assigned this Jan 4, 2019
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@ghost
Copy link

ghost commented Jan 4, 2019

HI @manhao-chen Hi @irajneeshgupta the issue was retested, and we can confirm that this is non issue.

@ghost ghost closed this as completed Jan 4, 2019
@xfolder
Copy link

xfolder commented Jan 15, 2019

Hi. I've same issue with DELETE CURL. Encoding the sku returns the payload but the product is not deleted.

Magento 2.3

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants