fix the misinterpretation of the %
character in a query string
#1998
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: new features are to be opened against next, hotfixes against master.
Summary
We've observed that Kong doesn't handle the '%' character when it's not part of a percent-encoding value (e.g. "foo=%bar%"). Since
encode_args
is only used inkong/core/handler.lua
and that query params are already decoded and moreover since we cannot at the same time deal with percent-encoded value and a decoded value containing the%
character without misinterpret it, we've remove the uncesserayunescape
call as we judged thatencode_args
should be called with theraw
option in the presence of percent-encoded value.Full changelog
unescape
call inencode_args
%
character with theencode_args
methodIssues resolved
Fix #1975
Link #1480 (comment)