-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Closed
Copy link
Labels
APIAPIs related issues and PRs.APIs related issues and PRs.Potential BugPotential bugs or bugfixes, that needs to be reproduced.Potential bugs or bugfixes, that needs to be reproduced.
Description
Sylius version affected: All versions 1.13, 1.14 and 2.0
Description
Using a newline character in the comment field in the endpoint: api/v2/shop/product-reviews causes an error.
This issue has been occurring since the commit in symfony/http-foundation symfony/http-foundation@168b77c, which fixes the issue GHSA-mrqx-rp3w-jpjp
Using the Symfony version, e.g. v6.4.13, which is one of the versions without the mentioned patch, the problem does not occur.
Example
url: api/v2/shop/product-reviews
Request Body:
{
"rating": 5,
"product": "everyday_white_basic_t_shirt",
"title": "Review title",
"comment": "review comment \n test 123"
}
Response:
{
"@context": "/api/v2/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "Invalid URI: A URI cannot contain CR/LF/TAB characters."
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
APIAPIs related issues and PRs.APIs related issues and PRs.Potential BugPotential bugs or bugfixes, that needs to be reproduced.Potential bugs or bugfixes, that needs to be reproduced.