Thanks to visit codestin.com
Credit goes to github.com

Skip to content

HttpClient parseUrl is broken and not RFC compilant #50670

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

Closed
Kozzi11 opened this issue Jun 15, 2023 · 0 comments
Closed

HttpClient parseUrl is broken and not RFC compilant #50670

Kozzi11 opened this issue Jun 15, 2023 · 0 comments

Comments

@Kozzi11
Copy link

Kozzi11 commented Jun 15, 2023

Symfony version(s) affected

5.4.24

Description

When I use HttpClient with url which contain this data a part of path segment:

custom|2010-01-01 00:00:00|2023-06-15 05:50:35

I have got error from calling part because of wrongly url encoded data.

Issue is caused by this pull #49299

How to reproduce

Calling HttpClient::parseUrl('http://some.url/custom|2010-01-01 00:00:00|2023-06-15 05:50:35?a=b#c)' should return result array:

Array
(
    ...
    [path] => /custom%7C2010-01-01%2000:00:00%7C2023-06-15%2005:50:35
    ...
)

Possible Solution

No response

Additional Context

No response

@Kozzi11 Kozzi11 added the Bug label Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
Kozzi11 pushed a commit to Kozzi11/symfony that referenced this issue Jun 15, 2023
nicolas-grekas added a commit that referenced this issue Jun 21, 2023
… (Daniel Kozák)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[HttpClient] Fix encoding some characters in query strings

| Q             | A
| ------------- | ---
| Branch?       | 5.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #50670 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

cb26c19 [HttpClient] Fix encoding some characters in query strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants