Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/244810

Change subject: Fix "installer started" detection
......................................................................

Fix "installer started" detection

NoLocalSettings.php tries to detect whether the installer has been
started or not. But this detection has been broken since I4cf237d when a
change was made to stop setting the session name when NO_SESSION is
defined, causing NoLocalSettings.php to be looking at a different
session-cookie than is actually being used by the installer.

The complete fix is twofold:
* Have WebInstaller::startSession() call session_name()
* Have NoLocalSettings.php not call session_name() when PHP's
  session.auto_start configuration setting is set.

Change-Id: I618d11df902b5d1f70e175bc94137621e9195c2f
---
M includes/NoLocalSettings.php
M includes/installer/WebInstaller.php
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/244810/1

diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php
index 6de9bfc..d299ab6 100644
--- a/includes/NoLocalSettings.php
+++ b/includes/NoLocalSettings.php
@@ -37,7 +37,9 @@
 if ( !function_exists( 'session_name' ) ) {
        $installerStarted = false;
 } else {
-       session_name( 'mw_installer_session' );
+       if ( !wfIniGetBool( 'session.auto_start' ) ) {
+               session_name( 'mw_installer_session' );
+       }
        $oldReporting = error_reporting( E_ALL & ~E_NOTICE );
        $success = session_start();
        error_reporting( $oldReporting );
diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index c2243b9..67a4def 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -343,6 +343,7 @@
                $this->phpErrors = array();
                set_error_handler( array( $this, 'errorHandler' ) );
                try {
+                       session_name( 'mw_installer_session' );
                        session_start();
                } catch ( Exception $e ) {
                        restore_error_handler();

-- 
To view, visit https://gerrit.wikimedia.org/r/244810
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I618d11df902b5d1f70e175bc94137621e9195c2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to