-
Notifications
You must be signed in to change notification settings - Fork 17
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
Sanitize TikTok URLs #77
Comments
Hello @chexxor, it depends on how TikTok URLs are structured and what needs to be removed. As I don't use TikTok, I have no clue and need user input here 🙂 In most cases a regular expression is sufficient. There are a few examples in this project of sanitizers that use regular expressions. |
I found some existing work for it. I'm not familiar with Rust, but I see a web request, so I would guess it's to do short-URL expansion if necessary, or maybe it's to check whether the URL is valid or not. Anyways, it looks like it just removes all the query parameters after ensuring it's a valid URL. |
My friends send links like this to me: So it must be a short link. We could use a regex to match the URL path in the short-URL, but to resolve it to the final URL and remove tracking parameters, we would need to fetch the expanded URL from TikTok. Short-URLs can be so nefarious. 😞 |
TikTok will know that I opened the URL if I use my browser to expand the short-URL, because my browser would send cookies. One advantage to using Leon to sanitize it is TikTok wouldn't get mg browser cookies, making the URL expansion relatively anonymous. Then, if I want to further share the URL with my other friends, it's better to share the anonymized URL rather than the original one. So there's an advantage to using Leon to open TikTok links for myself, and also for my friends with whom I reshare a link. Related to discussion on Amazon links here: #75 |
As you already found out, there is a similar discussion regarding Amazon short links. Leon would have to perform a HTTP request while currently it can do all the cleaning locally. I still haven't decided whether I like or hate this idea 😉 |
I decided to not implement this because I believe that Leon should stay close to its roots, namely providing privacy by removing tracking and other obsolete parameters. Performing network requests actually reduces privacy because it leaves trails on the server owned by the company, in this case TikTok (ByteDance). If you really want to sanitize these URLs, please unwrap them manually by opening them and then send the unwrapped URL to Leon. If you further want to talk about this, please use this discussion. |
I think Leon should have a sanitizer for TikTok URLs.
I'm pretty busy, myself, but if I find time, what's the most tricky part of adding a sanitizer? What's the best way to resolve it?
The text was updated successfully, but these errors were encountered: