-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 #21179
Comments
Hi @xfolder. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @xfolder do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Hi @ravi-chandra3197. Thank you for working on this issue.
|
✅ Confirmed by @engcom-backlog-nazar Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @irajneeshgupta. Thank you for working on this issue.
|
I am working on this at #dmcdindia1 |
Server issue , allow AllowEncodedSlashes in apache conf. |
Hello @magento/quality-maintainers team, May I ask you to review this Issue and Confirm is it still reproducible on the latest vanilla Magento? Thank you in advance! |
Hi @shikhamis11. Thank you for working on this issue.
|
Hi @engcom-Charlie. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Charlie Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
#mm19pl |
@henryk-zaborowski thank you for joining. Please accept team invitation here and self-assign the issue. |
Hi @henryk-zaborowski. Thank you for working on this issue.
|
This is not a Magento 2 bug, but an apache2 one. Instead of looking for workaround for this case, Magento should not allow for usage of slash (%2F) and backslash (%5C) in SKU. |
I would say it's better to use
More details: https://httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashes |
Preconditions
Steps to reproduce
Fresh install
Create product (of any type) with SKU containing /, e.g. "0RJ9548SN-212/W0-54"
searching for the product with
GET : /rest/v1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=0RJ9548SN-212%2FW0-54
returns results as expected
but when getting the stockItems with the following
GET : /rest/V1/stockItems/0RJ9548SN-212%2FW0-54
result 404 status - BUT the actual data is returned?
when trying to update the stockItem
PUT : /rest/V1/products/0RJ9548SN-212%2FW0-54/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/0RJ9548SN-212%2FW0-54
result 404 status - BUT the actual data is returned?
PUT : /rest/V1/products/0RJ9548SN-212%2FW0-54/stockItems/100
result : 404 status - message=Request does not match any route.
same issue -> #13343
The text was updated successfully, but these errors were encountered: