-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Handle relative paths when sanitizing URLs #41995
Conversation
In the initial PR(apache#41665) we didn't handle the relative path in URL which led to issue(apache#41977). This PR aims at handling the relative path case when sanitizing URLs
Not entirely sure where to add test cases, if someone can point me to it? |
Not sure if we have some tests for this one ? @pierrejeambrun @bbovenzi ? |
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.
LGTM now. I never imagined such a simple thing in javascript needs to be done in such way (but it's much more reasonable than the initial way).
@utkarsharma2 This will target 2.10.2? |
I marked it so - but this was I think what we agreed on, that it is not going to cancel rc1 |
Thanks @potiuk, yes this belongs to 2.10.2. |
Hi, Could we have this in 2.10 ? |
It is already released in 2.10.2 - have you checked it @mfatemipour ? Can you please verify it in release notes and upgrade (2.10.4 is now available)/ test locally and confirm that it works? If not, open a new issue describing the problem you have. Thanks for your help in advance. |
I am on 2.10.3 and this is still happening, on checking it looks like the fix is not in the releases, the code is visible in the main branch but not in the tags 2.10.4 / 2.10.3 |
Interesting: @utkarsharma2 -> it's marked with 2.10.2 milestone, but yes it seems it's not cherry-picked there. |
I changed milestone to 2.10.5 and will cherry-pick it for 2.10.5 |
But it would be great to find what happened :) |
* Handle relative paths when sanitizing URLs In the initial PR(apache#41665) we didn't handle the relative path in URL which led to issue(apache#41977). This PR aims at handling the relative path case when sanitizing URLs * Add PR suggestions * Update code comment (cherry picked from commit 0429bf4) Co-authored-by: Utkarsh Sharma <[email protected]>
) * Handle relative paths when sanitizing URLs In the initial PR(#41665) we didn't handle the relative path in URL which led to issue(#41977). This PR aims at handling the relative path case when sanitizing URLs * Add PR suggestions * Update code comment (cherry picked from commit 0429bf4) Co-authored-by: Utkarsh Sharma <[email protected]>
I think I missed backporting it, somehow. I will investigate more. :/ Thanks for the backporting it. |
Yeah. Could be also some tooling issue of ours :(. I think we should do some extra scrutiny for 2.10.5 (with @kaxil on board as well). This is actually the problem with release management tools, that when they work, we start trusting them and stop checking and validating things, bue it's pretty natural that some refactorings introduce some new cases - including edge cases, so once in a while we should pretty manually verify all the steps of release process, otherwise we might miss something. Having this check for 2.10.5 might be a good idea to do it in preparation for 3.0.0 (though there we will have to do extra-extra-scrutiny as there will be MANY NEW THINGS). At least if we find and fix some things in 2.10.5 we will have less to do when 3.0.0 comes. |
In the initial PR(#41665) we didn't handle the relative path in URL which led to issue(#41977). This PR aims at handling the relative path case when sanitizing URLs
The issue is fixed with current change:
![Screenshot 2024-09-04 at 6 53 13 PM](https://private-user-images.githubusercontent.com/13021213/364393596-eee32189-742b-4cc0-b7e7-b7435641cf05.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzg3ODMsIm5iZiI6MTczOTMzODQ4MywicGF0aCI6Ii8xMzAyMTIxMy8zNjQzOTM1OTYtZWVlMzIxODktNzQyYi00Y2MwLWI3ZTctYjc0MzU2NDFjZjA1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA1MzQ0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0N2JiYmQ4MTJmNzE5NjNiM2Q0ZmEzMDEwZWM3ZWU2YTM0M2UyNDA3ZjExMzY5OTk4NTMyZTdiNzQ2NDljZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yJvQ4Vx9a03HbhxsLLG5Kz8FhiFu3wy6u0nsdcDo9uw)