Enforce MW_NO_SESSION, add MW_NO_SESSION_HANDLER
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 18 Feb 2016 20:56:40 +0000 (15:56 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 22 Feb 2016 17:17:31 +0000 (12:17 -0500)
commitf61cb18b71dac4b8117c36c4b54653742f6e118c
treec2631834bb40d02cdad5b2b3a94cee9afc57d6ea
parent0ec0fa40287fa6337ced01ca6c152d03ae45488d
Enforce MW_NO_SESSION, add MW_NO_SESSION_HANDLER

When an entry point specifies MW_NO_SESSION, actually enforce that by
having both SessionManager and PHP's session handling (session_start()
and friends) throw exceptions.

If an entry point needs the old behavior of using PHP's default session
handling (as defined in php.ini), it should define
MW_NO_SESSION_HANDLER instead of or in addition to MW_NO_SESSION.

This also makes PHPSessionHandler be installed in CLI mode, where it
wasn't installed before.

Bug: T127233
Change-Id: I2a3db06ee8e44a044096c57a819b5fd5e51c5c5c
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/Setup.php
includes/installer/Installer.php
includes/session/PHPSessionHandler.php
includes/session/SessionManager.php
includes/user/User.php