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

When cookie has invalid session id, it goes to a login page instead of authenticating. #6

Closed
drewferagen opened this issue Nov 4, 2016 · 1 comment
Assignees

Comments

@drewferagen
Copy link

This extensions works pretty great, but there was an issue I was having when I would access the site from other PCs or after leaving the browser idle until the session is no longer valid.

Instead of logging in automatically it would go to the page asking to login, at that point if I refresh or click another link, the extension works normally. This annoyed me greatly so I did a bunch of digging and found a fix.

In the provideSessionInfo function of AuthRemoteuser.body.php if you change this line:

if (null === $id) {

into

if ((null === $id)||(!MediaWiki\Session\SessionManager::singleton()->getSessionById($id))) {

It will assign a new sessionid if the id is null or if the session is no longer valid, which means no more annoying login page.

fnk pushed a commit that referenced this issue Nov 7, 2016
@fnk fnk self-assigned this Nov 7, 2016
@fnk
Copy link
Contributor

fnk commented Nov 7, 2016

Thanks for the fix!
I added that in commit 84949eb

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

No branches or pull requests

2 participants