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

initialize session false + login plugin -> RuntimeException (403) #266

Open
Japhys opened this issue Oct 11, 2020 · 5 comments
Open

initialize session false + login plugin -> RuntimeException (403) #266

Japhys opened this issue Oct 11, 2020 · 5 comments
Labels

Comments

@Japhys
Copy link

Japhys commented Oct 11, 2020

I only want a session cookie whenever a guest is logging in and no cookies for anonymous guests.
So I disabled initialize session
I was under the impression login would initialize a session anyway
But something went wrong
See attach
Happens both in 1.6 and 1.7
Clean browser, no cache
Am I wrong? Is this not going to work with login plugin?

OnPaste 20201011-215513

@rhukster
Copy link
Member

Login does require the session to be enabled at all times. The disabled session option is really only intended for use cases where there is no login at all.

@Japhys
Copy link
Author

Japhys commented Oct 11, 2020

Thanks for clearing that up, and so fast :)

I was experimenting with varnish and it would make it a lot easier to cache for anonymous users, hence the question

@mahagr
Copy link
Member

mahagr commented Oct 21, 2020

The above code fails on rememberme, which requires the session to be stored. If you disable it, you may get a step forward.

@Japhys
Copy link
Author

Japhys commented Oct 23, 2020

That was my initial thought as well, however it didn't solve the problem. Plugin still didn't work when initialize session was disabled.

@mahagr
Copy link
Member

mahagr commented Dec 2, 2020

I just tested this out. Remember me does seem to think that you stole the cookie.

The main issue here is that there is no way to figure out if user has been logged in if you don't open the session. So the only way to fix this is to destroy the session if user hasn't been logged in, though I don't know if it will still send the cookie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants