-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Bug: Fix issue with double encoding on space in secret history route #10596
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
chelshaw
reviewed
Dec 18, 2020
chelshaw
approved these changes
Dec 18, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
chelshaw
approved these changes
Dec 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Monkeychip
added a commit
that referenced
this pull request
Jan 4, 2021
…10596) * setup for concept it works, but probably not the best solution * add comment and remove console and test var * use normalize path higher up to fix issu * add test for bug that fixing * forgot a couple of changes * changelog
Monkeychip
added a commit
that referenced
this pull request
Jan 4, 2021
…10596) * setup for concept it works, but probably not the best solution * add comment and remove console and test var * use normalize path higher up to fix issu * add test for bug that fixing * forgot a couple of changes * changelog
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.
This fix address PR issue 10418
We call a method
to
encodePath
which is apart of a third-party library. By default, this method encodes spaces from%20
. The problem is that we have already encoded white spaces before it gets sent to this method, such that the white spaces essential get encoded twice resulting in%2520
instead of%20
. To fix this, I replaced the already encoded space using regex back to whitespace before it gets sent to this method.Because the URL is getting sent to
encodePath
no matter what, I don't see any issues here, but it's worth some consideration.Here is the library for the encodePath and here is a PR that talks about the special characters it does not encode (white space is not included).
With fix: The version page now shows where before it didn't.
Without fix: Double encoding on the spaces shows up at %2520
From a helpful Stackoverflow article