Last modified: 2011-03-13 18:05:38 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 T19422, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17422 - Use Sessions instead of cookies for Login
Use Sessions instead of cookies for Login
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-09 09:55 UTC by tim987
Modified: 2011-03-13 18:05 UTC (History)
3 users (show)

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


Attachments

Description tim987 2009-02-09 09:55:46 UTC
Currently Mediawiki uses cookies when users login. The next version of mediawiki should use sessions instead of cookies. The advantages are:

More secure. If a person accidentally clicks 'remember me' when they login using a public computer, and they close the browser thinking it will log them out, another person uses the public computer and goes to the wiki the previous user was at and that person will now have full access to someone else's account.

Sessions work on browsers that have cookies disabled.

So can Mediawiki use sessions for login instead of cookies in the next version please?
Comment 1 Alexandre Emsenhuber [IAlex] 2009-02-11 18:39:18 UTC
I don't understand you, we already use sessions to store login when "Remember me" is not checked.
If you don't want cookies, you cant set $wgCookieExpiration = 0; which since 1.14 disables the "Remember me" option.
Comment 2 Brad Jorsch 2009-02-13 03:18:58 UTC
Do you realize that url-parameter-based sessions (as opposed to cookie-based sessions, which is what MediaWiki uses currently) will leave the session key in the browser's url history, no matter whether you click "remember me" or not?
Comment 3 tim987 2009-02-18 02:46:38 UTC
Alexandre Emsenhuber, Try this using IE7:

Click Tools, then click "delete browsing history" and clear everything. Close IE7.

Now open IE7, click on Tools, Internet options, Privacy, and slide to choose the setting "BLOCK ALL COOKIES", then go to bugzilla.wikimedia.org and Login with your email and password, then click on "enter a new bug", and you will see it will Log you out, so you will NOT be able to enter a new bug report.
 This is because mediawiki uses COOKIES and if cookies are DISABLED on a web browser, you cannot login OR you will be LOGGED out.
 Using Sessions works WITHOUT cookies. That's why I said use Sessions instead of cookies.

Another example, with your cookies STILL blocked, go to wikipedia.org, and login and it will say this:

"Login error.Wikipedia uses cookies to log in users. You have cookies disabled. Please enable them and try again."


Brad Jorsch, the Session key is DELETED when a user closes their browser.
Comment 4 Brion Vibber 2009-02-18 02:51:24 UTC
URL-based session tokens are unsafe (they leak to 3rd-party referers and in cut-n-paste), disrupt caching, and are otherwise troublesome -- cookies were introduced to HTTP precisely to allow state like login sessions to be handled more sensibly than this.

MediaWiki does not and will not support URL-based sessions due to those problems.

If you are referring instead to HTTP authentication, that's even harder to deal with -- there's no native way to close a login session or forget credentials temporarily. We have no intention to support this either, though there are HTTP auth plugins available.

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


Navigation
Links