You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the special processing for unquoting + signs in the query parts.
Additional Context
PHP provides (hopefully) standard compliant functions like urlencode() / rawurlencode() / http_build_query() and they are used here in the code, but the results are modified afterwards.
Maybe it is better to fix such fundamental things directly in PHP and not in a user space library.
The current code of HttpClientTrait.php is very complicated, so I am afraid of opening a merge request. Maybe it is useful to rethink the code (for 6.3 or 6.4), where to use urlencode() and where rawurlencode() and if it is possible to more rely on plain PHP to reduce complexity.
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
5.4.21,6.2.7
Description
In a query part of an URL the plus sign ("+") is a placeholder for a space, so it has to be encoded with "%2B".
In the commit that is fixing the issue which is included in versions
5.4.21
and6.2.7
the bug has been introduced.The merge request refers to this stackoverflow thread which describes this as "special meaning".
How to reproduce
Possible Solution
Remove the special processing for unquoting + signs in the query parts.
Additional Context
PHP provides (hopefully) standard compliant functions like
urlencode()
/rawurlencode()
/http_build_query()
and they are used here in the code, but the results are modified afterwards.Maybe it is better to fix such fundamental things directly in PHP and not in a user space library.
The current code of
HttpClientTrait.php
is very complicated, so I am afraid of opening a merge request. Maybe it is useful to rethink the code (for 6.3 or 6.4), where to useurlencode()
and whererawurlencode()
and if it is possible to more rely on plain PHP to reduce complexity.The text was updated successfully, but these errors were encountered: