-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: Opt-In for url-encoded slashes in URL paths #1071
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…of the urlencoded slashes in paths
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1071 +/- ##
==========================================
+ Coverage 89.16% 89.19% +0.03%
==========================================
Files 246 246
Lines 10305 10347 +42
==========================================
+ Hits 9188 9229 +41
- Misses 879 880 +1
Partials 238 238 ☔ View full report in Codecov by Sentry. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issue(s)
closes #1070
Checklist
Description
This PR implements an explicit opt-in for url-encoded slashes in URL paths, used while matching a request in all operation modes, as well as when forwarding the request to the upstream service in proxy mode.
The new rule-level configuration property is named
allow_encoded_slashes
and can be set to the following values:off
- Reject requests containing encoded slashes. Means, if the request URL contains an url-encoded slash (%2F
), the rule will not match it. This is also the default setting, if the property is not configured explicitly.on
- Accept requests using encoded slashes, decoding them and making it transparent for the rules and the upstream url. That is, the%2F
becomes a/
and will be treated as such in all places.no_decode
- Accept requests using encoded slashes, but not touching them and showing them to the rules and the upstream. That is, the%2F
just remains as is.