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

Handle obfuscated share links #861

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

pts314
Copy link

@pts314 pts314 commented Oct 4, 2023

Adds /r/:sub/s/:id pattern in main.rs to follow obfuscated share links and strips share info. As noted in the attached issue, it could be better by adding a warning, but this at least will continue to allow things to function in the mean time

Resolves: #859

@kylrth
Copy link
Contributor

kylrth commented Oct 4, 2023

Deployed to https://libreddit.kylrth.com, works as promised

@mikupls
Copy link
Contributor

mikupls commented Nov 4, 2023

Thanks for the work!

Does it work though?
I get Bad response from reddit.com when I try to use a share link.

My understanding is that Url::parse expects an absolute path, but we give it a relative one in the current code.
I had to apply this change to make it work for me: mikupls@9637a4a
This is not a nice solution because now the libreddit url is cluttered with share parameters (seemingly what parsed_path.path() tried to prevent).

@pts314
Copy link
Author

pts314 commented Nov 22, 2023

Thanks for the digging! I realized that we can just split after we have just the path, so that's what it's doing now

@kylrth
Copy link
Contributor

kylrth commented Nov 23, 2023

Just deployed this to https://libreddit.kylrth.com/, appears to work

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.

✨ Feature parity: follow new share links
3 participants