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

added decoded=False to hyperlink parser #4989

Closed
wants to merge 3 commits into from
Closed

Conversation

37b
Copy link
Contributor

@37b 37b commented Aug 26, 2021

Added decoded=False to hyperlink.parse to mitigate errors when parsing URLs with non-ASCII chars.

See python-hyper/hyperlink#173

@damiencarol
Copy link
Contributor

@37b the change broke a lot of thing endpoint related. it seems that it needs more modifications

@damiencarol
Copy link
Contributor

FYI @kiblik

@37b
Copy link
Contributor Author

37b commented Aug 27, 2021 via email

@damiencarol damiencarol self-requested a review August 27, 2021 12:19
@Maffooch
Copy link
Contributor

Hi @37b how are things going on this?

@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@37b
Copy link
Contributor Author

37b commented Apr 16, 2022

@kiblik have you looked at this? I am not as familiar with the downstream problems caused

@stale stale bot removed the stale label Apr 16, 2022
@kiblik
Copy link
Contributor

kiblik commented Apr 16, 2022

Well, I see no problem with this implementation. However, @37b, are you able to prepare unittests for this scenario?

@github-actions
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@37b
Copy link
Contributor Author

37b commented May 12, 2022

@kiblik @Maffooch I finally had time to look at this and found the downstream problem and put in a fix. I pushed the changes but still working on additional tests.

@37b
Copy link
Contributor Author

37b commented May 12, 2022

This issue is likely not able to be resolved with current parsing methods.

From my limited understanding of URL encoding the character %F6 is a Windows-1252 encoding value. The character ö is %F6 with Windows-1252 encoding and %C3%B6 as UTF-8.

When requesting the URL https://host.com/BMF%20Veröffentlichungen\?WamReturn\=true\&host_header\=host the application/server responds with the proper URL encoded value https://host.com/BMF%20Ver%C3%83%C2%B6ffentlichungen?host_header=host">here</a>.</h2> in a 302 response.

I presume then that the test tool (in this case WhiteHat Sentinel) is converting the URL to Windows-1252 encoding while being processed for reporting.

Since this is somewhat of an edge case and a fix would need fundamental changes to the Endpoint validations/encapsulation I'll just close this out.

@37b 37b closed this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants