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

Query parameter value with ":" (colon) is not encoded #1102

Closed
philippeu opened this issue Oct 28, 2019 · 1 comment · Fixed by #1138
Closed

Query parameter value with ":" (colon) is not encoded #1102

philippeu opened this issue Oct 28, 2019 · 1 comment · Fixed by #1138
Assignees
Labels
bug Unexpected or incorrect behavior feedback provided Feedback has been provided to the author

Comments

@philippeu
Copy link

philippeu commented Oct 28, 2019

with openfeign 10.2.3

query parameter value with ":" is not encoded , e.g. "url=http://toto.com" produces "url=http:%2F%2Ftoto.com" instead of "url=http%3A%2F%2Ftoto.com".
what i understand from rfc3986 section 2.2 is that ":" should be encoded

URI producing applications should percent-encode data octets that
correspond to characters in the reserved set unless these characters
are specifically allowed by the URI scheme to represent data in that
component. If a reserved character is found in a URI component and
no delimiting role is known for that character, then it must be
interpreted as representing the data octet corresponding to that
character's encoding in US-ASCII.

Note that ":" was encoded in openfeign 10.1.0.

Seems related to refactor done in FragmentType UriUtils.java

@kdavisk6
Copy link
Member

kdavisk6 commented Nov 3, 2019

@philippeu

This appears to be an issue with our URI template encoding. I'll mark it as a bug and related it to #1019

@kdavisk6 kdavisk6 added the bug Unexpected or incorrect behavior label Nov 3, 2019
@kdavisk6 kdavisk6 added the feedback provided Feedback has been provided to the author label Nov 15, 2019
kdavisk6 added a commit to kdavisk6/feign that referenced this issue Dec 26, 2019
Fixes OpenFeign#1123, Fixes OpenFeign#1133, Fixes OpenFeign#1102

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied correctly.
kdavisk6 added a commit to kdavisk6/feign that referenced this issue Dec 26, 2019
Fixes OpenFeign#1123, Fixes OpenFeign#1133, Fixes OpenFeign#1102, Fixes OpenFeign#1028

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied and empty parameters to be expanded correctly as this
is the main use case that exhibited this issue.
@kdavisk6 kdavisk6 self-assigned this Dec 26, 2019
kdavisk6 added a commit to kdavisk6/feign that referenced this issue Dec 27, 2019
Fixes OpenFeign#1123, Fixes OpenFeign#1133, Fixes OpenFeign#1102, Fixes OpenFeign#1028

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied and empty parameters to be expanded correctly as this
is the main use case that exhibited this issue.
kdavisk6 added a commit that referenced this issue Dec 27, 2019
* Ensure Iterable values are encoded before template expansion

Fixes #1123, Fixes #1133, Fixes #1102, Fixes #1028

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied and empty parameters to be expanded correctly as this
is the main use case that exhibited this issue.
velo pushed a commit that referenced this issue Oct 7, 2024
* Ensure Iterable values are encoded before template expansion

Fixes #1123, Fixes #1133, Fixes #1102, Fixes #1028

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied and empty parameters to be expanded correctly as this
is the main use case that exhibited this issue.
velo pushed a commit that referenced this issue Oct 8, 2024
* Ensure Iterable values are encoded before template expansion

Fixes #1123, Fixes #1133, Fixes #1102, Fixes #1028

Ensures that all expressions are fully-encoded before being
manipulated during template expansion.  This allows parameters
to include reserved values and result in properly encoded
results.

Additionally, `Iterable` values are now handled in accordance
with RFC 6570 allowing for the specified `CollectionFormat` to
be applied and empty parameters to be expanded correctly as this
is the main use case that exhibited this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or incorrect behavior feedback provided Feedback has been provided to the author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants