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

fix: Safer URL parsing & replacing #4

Merged
merged 4 commits into from
Jun 15, 2024

Conversation

siketyan
Copy link
Contributor

@siketyan siketyan commented Jun 15, 2024

x2vx-android parses and replaces url roughly for now, so URLs like https://x.com.example.com/ also be replaced to https://vxtwitter.com/ by this app. This pull request proposes to use URI class for parsing and replacing the host in URLs instead.

Also I added some test cases to ensure the problem and this fix resolves it.

Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
@unlimish unlimish merged commit 720266b into unlimish:master Jun 15, 2024
@unlimish
Copy link
Owner

Thank you for refactoring and writing tests!!!!!

@siketyan siketyan deleted the feat/safe-url-parsing branch June 15, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants