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

Fixes #20943: Rudder incorectly parse URL with a '+' in the path into spaces #4217

Conversation

fanf
Copy link
Member

@fanf fanf commented Mar 28, 2022

https://issues.rudder.io/issues/20943

When on API, correct back "+" that were changed inot " " by lift

Also correct tests that were not returning the correct node :/

@fanf
Copy link
Member Author

fanf commented Mar 28, 2022

PR updated with a new commit

@fanf
Copy link
Member Author

fanf commented Mar 29, 2022

PR updated with a new commit

// https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20/29948396#29948396
(req.path.partPath.map { e =>
// change back spaces into "+"
ApiPathSegment.Segment(e.replaceAll(" ", "+"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there is a space intended ? can we try both ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we never want spaces in api path. This is very uncomon and a source of problems.
(that's not for the query parameters, just the path)

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/4217
-- Your faithful QA
Kant merge: "Happiness is not an ideal of reason, but of imagination."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/54131/console)

@fanf
Copy link
Member Author

fanf commented May 12, 2022

OK, squash merging this PR

@fanf fanf force-pushed the bug_20943/rudder_incorectly_parse_url_with_a_in_the_path_into_spaces branch from fc9c368 to 0c794c1 Compare May 12, 2022 14:09
@fanf fanf merged commit 0c794c1 into Normation:branches/rudder/6.2 May 12, 2022
@fanf fanf deleted the bug_20943/rudder_incorectly_parse_url_with_a_in_the_path_into_spaces branch March 15, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants