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

Follow redirection is broken #233

Closed
elegaanz opened this issue Sep 18, 2018 · 5 comments
Closed

Follow redirection is broken #233

elegaanz opened this issue Sep 18, 2018 · 5 comments
Labels
A: Backend Code running on the server C: Bug Something isn't working
Milestone

Comments

@elegaanz
Copy link
Member

For some reason the URL you get redirect to after following someone is considered invalid by Rocket and it returns a 500 page…

The problematic redirection seems to be this one: https://github.com/Plume-org/Plume/blob/master/src/routes/user.rs#L138

Plume version: 0.2.0

@elegaanz elegaanz added C: Bug Something isn't working P: Medium A: Backend Code running on the server labels Sep 18, 2018
@elegaanz elegaanz added this to the Alpha 2 milestone Sep 18, 2018
@trinity-1686a
Copy link
Contributor

Oddly enough, I can't reproduce on my local instance, and trying on https://baptiste.gelez.xyz, I can't reproduce either. Any more information, specific commit id, public instance having this issue or something?

@elegaanz
Copy link
Member Author

It happened to me when trying to follow someone through a link to the follow URL (i.e. /@/username/follow). I think there is a problem with links to Plume, because I can notice that when clicking your link to https://baptiste.gelez.xyz I'm not logged in, but if I go to any other page I am… Also when someone links a post it is often marked as not found, but then if you access this post through the instance homepage for instance it works fine… It is really weird…

@trinity-1686a
Copy link
Contributor

The problem of being connected is not with links, the user_id cookie is marked samesite: Strict, so if we came from another site, the cookie is not sent by a browser honoring this feature (it's a csrf countermeasure that Rocket enable by default for secure cookies, but it won't protect some browsers which doesn't implement it and ignore the flag)

trinity-1686a added a commit that referenced this issue Sep 30, 2018
Update to latest rocket_csrf
Make user_id a samesite lax cookie (see #233 (comment))
@trinity-1686a
Copy link
Contributor

Is it still an issue? If yes, can you give me a step by step howto? I still can't reproduce it neither on my dev instance nor on a public one, even when trying with remote users. Is it possible it's linked to the particular browser you use to access Plume?

@elegaanz
Copy link
Member Author

No it has been fixed I think. If we realize it's not, we will still be able to reopen this issue :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Backend Code running on the server C: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants