Last modified: 2014-05-20 15:03:03 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 T67493, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65493 - Session is started by EditAction (problem for extensions using UserLoadFromSession hook)
Session is started by EditAction (problem for extensions using UserLoadFromSe...
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.22.6
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-19 16:29 UTC by Yørn de Jong
Modified: 2014-05-20 15:03 UTC (History)
2 users (show)

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


Attachments

Description Yørn de Jong 2014-05-19 16:29:57 UTC
When submitting, SubmitAction#show() is executed, which runs wfSetupSession(). This is a problem for extensions using the UserLoadFromSession hook, as the SubmitAction is called before the UserLoadFromSession hook.

My extension does it's own session management, using the PHP session manager. When MediaWiki suddenly runs its own session_start(), it will create a different session (with a different session name and session id).

How to reproduce:
1. Install an extension that will handle sessions. Mine is https://www.mediawiki.org/wiki/Extension:SimpleSamlAuth
2. Clear cookies
3. Visit your wiki and log in
4. Observe cookies (only SAML cookies are set)
5. Make a change (it will fail the first time, due to the cookie missing)
6. Observe cookies (both SAML and MediaWiki cookies are set)

Actual results:
MediaWiki will, despite a UserLoadFromSession hook being configured, set it's own cookie and create it's own session upon submit.

Expected results:
MediaWiki will never set its own cookie because a hook is set.

Note:
- A lot of UserLoadFromSession extensions I have observed call wfSetupSession() themselves. I think this is not how the hooks are supposed to work, but this would solve my problem.

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


Navigation
Links