Last modified: 2014-09-23 23:31:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72855, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70855 - Login as another user no longer works
Login as another user no longer works
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.24rc
All All
: High normal (vote)
: 1.24.0 release
Assigned To: Bartosz Dziewoński
:
: 69475 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-15 18:16 UTC by Isarra
Modified: 2014-09-23 23:31 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Isarra 2014-09-15 18:16:26 UTC
If you're already logged in, you can not longer directly log in as another user (such as with bots, different privilege or role accounts, sockpuppets, etc) without first logging out.

This is annoying and shouldn't have happened.
Comment 1 Steven Walling 2014-09-15 19:15:51 UTC
This is an odd regression. For reproducibility:

1. Visit a wiki while logged in.
2. Search for Special:UserLogin or enter in the URL manually. 
3. You are redirected to the Main Page

Expected behavior: until recently, you should have been able to visit Special:UserLogin while authenticated as another account. The form then tells you that you are already logged in and allows you to login as a separate user.
Comment 2 Bartosz Dziewoński 2014-09-15 22:38:17 UTC
Caused by the fix for bug 15484: d0439af89f6b254cea09b3773ab139f04f81a97d.
Comment 3 Bartosz Dziewoński 2014-09-15 22:39:25 UTC
(If this is fixed, 5dfc57eb80098a2016ed98cbdcca8ee6e1af1c79 should be reverted.)
Comment 4 Tyler Romeo 2014-09-15 22:52:30 UTC
The issue fixed by the bug is pretty important, so simply reverting the patch will not actually solve anything.

IMO, the bug described (switching between accounts) should really be solved by some sort of account switcher, e.g., like Google has.
Comment 5 Bartosz Dziewoński 2014-09-15 23:13:02 UTC
Indeed, but it should be easy enough to show the form instead of redirecting when the user is logged in and there's no 'returnto' parameter.
Comment 6 Jon 2014-09-16 01:19:08 UTC
To play devils advocate, why would you want to visit the login form whilst logged in? What is wrong with logging out and then visiting it?
Comment 7 Tyler Romeo 2014-09-16 02:05:50 UTC
(In reply to Bartosz Dziewoński from comment #5)
> Indeed, but it should be easy enough to show the form instead of redirecting
> when the user is logged in and there's no 'returnto' parameter.

(In reply to Jon from comment #6)
> To play devils advocate, why would you want to visit the login form whilst
> logged in? What is wrong with logging out and then visiting it?

These two sort of go together.

The only situation in which there would be no 'returnto' parameter is if you manually navigated to the login page by typing "Special:Userlogin" in the search bar (or by entering it in your address bar). I feel like it is much easier and trivial to simply click Logout and then log back in again.

We might be able to improve the experience by having the logout page redirect back to the login page automatically, and just display a message saying you were logged out.
Comment 8 Betacommand 2014-09-16 02:18:01 UTC
However logging out can cause problems because it invalidates all login sessions. If a user is operating a bot and switches to remove the new message talk page notice, it logs the bot out. 

Honestly I think what this is fixing is a mole hill compared to the mountain of problems that it creates.
Comment 9 Tyler Romeo 2014-09-16 02:39:32 UTC
(In reply to Betacommand from comment #8)
> However logging out can cause problems because it invalidates all login
> sessions. If a user is operating a bot and switches to remove the new
> message talk page notice, it logs the bot out. 

That is CentralAuth, not a property of core.
Comment 10 Betacommand 2014-09-16 02:46:05 UTC
Actually its not. That particular issue has existed for as long as I can remember (~2006) If I log in via a bot, the cookies/session is kept and reused as needed. If I then login via a web browser, both sessions work. However if I log out via the web browser, the session/tokens that the bot have been using get invalidated and cause the bot to no longer be logged in. 

That is about as core as one can get, prior to this a user could be logged in as themselves, note their bot has a new message, log into the bot account, clear the message, and then log back into the main account without ever logging out. This enables multiple logins and does not cause issues where the bot or user gets logged out on other devices/locations.
Comment 11 Tyler Romeo 2014-09-16 03:01:07 UTC
(In reply to Betacommand from comment #10)
> Actually its not. That particular issue has existed for as long as I can
> remember (~2006) If I log in via a bot, the cookies/session is kept and
> reused as needed. If I then login via a web browser, both sessions work.
> However if I log out via the web browser, the session/tokens that the bot
> have been using get invalidated and cause the bot to no longer be logged in. 
> 
> That is about as core as one can get, prior to this a user could be logged
> in as themselves, note their bot has a new message, log into the bot
> account, clear the message, and then log back into the main account without
> ever logging out. This enables multiple logins and does not cause issues
> where the bot or user gets logged out on other devices/locations.

I can assure you that MediaWiki core does not simultaneously log out all sessions. All logging out does is clear your cookies. I also just tested this on my Vagrant instance using two different browsers,
Comment 12 Jon 2014-09-16 06:22:03 UTC
https://bugzilla.wikimedia.org/show_bug.cgi?id=49890

There was discussion on mailing lists about killing this behaviour.
Comment 13 Jon 2014-09-17 18:36:18 UTC
*** Bug 69475 has been marked as a duplicate of this bug. ***
Comment 14 Gerrit Notification Bot 2014-09-19 15:23:38 UTC
Change 161465 had a related patch set uploaded by Bartosz Dziewoński:
Allow logged-in users to view and use the login form

https://gerrit.wikimedia.org/r/161465
Comment 15 Gerrit Notification Bot 2014-09-22 14:15:59 UTC
Change 161465 merged by jenkins-bot:
Allow logged-in users to view and use the login form again

https://gerrit.wikimedia.org/r/161465
Comment 16 Bartosz Dziewoński 2014-09-22 14:18:54 UTC
Patch merged in master, leaving this open until it's clean if we need to backport to 1.24, or if it will be included.
Comment 17 Gerrit Notification Bot 2014-09-22 20:32:35 UTC
Change 162120 had a related patch set uploaded by Legoktm:
Allow logged-in users to view and use the login form again

https://gerrit.wikimedia.org/r/162120
Comment 18 Gerrit Notification Bot 2014-09-22 20:40:07 UTC
Change 162120 merged by jenkins-bot:
Allow logged-in users to view and use the login form again

https://gerrit.wikimedia.org/r/162120
Comment 19 Bartosz Dziewoński 2014-09-22 20:47:31 UTC
Backported.
Comment 20 Jon 2014-09-23 22:52:45 UTC
So to be clear the fix has reopened bug 15484
Comment 21 Bartosz Dziewoński 2014-09-23 23:16:55 UTC
(Per bug 15484 comment 27 it hasn't. The fix here only changes any behavior if a user types "Special:UserLogin" in the search box or address bar, or otherwise directly visits the login page.)
Comment 22 Steven Walling 2014-09-23 23:20:34 UTC
(In reply to Bartosz Dziewoński from comment #21)
> (Per bug 15484 comment 27 it hasn't. The fix here only changes any behavior
> if a user types "Special:UserLogin" in the search box or address bar, or
> otherwise directly visits the login page.)

Tested and confirmed on Beta Labs. 

Thanks Bartosz.
Comment 23 Jon 2014-09-23 23:31:22 UTC
My bad. Thanks for the clarification and sorry for the confusion :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links