Page MenuHomePhabricator

Problem with User.php if no cookies present
Closed, ResolvedPublic

Description

When trying to login into a wiki immediately after clearing all cookies in a browser the
access to the $_SESSION variable in line 2111 will fail, since it is not set.
Here is the fix:

		if (isset($_SESSION)) 
			$_SESSION = $session + $_SESSION;
		else
		  $_SESSION = $session;

Version: 1.13.x
Severity: minor

Details

Reference
bz16579

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:30 PM
bzimport set Reference to bz16579.
bzimport added a subscriber: Unknown Object (MLST).

r45374 doesn't look like it'll have any affect whatsoever -- !is_null() and isset() will be returning the same result, so there'll be no change in behavior. If it was wrong before, it's still wrong.

is_null throws notices if the variable is not defined.

So the state of the bug was "already fixed" before r45374, and r45374 was simply a cleanup for a notice warning in the already-existing fix?

Mainframe98 subscribed.

So the state of the bug was "already fixed" before r45374, and r45374 was simply a cleanup for a notice warning in the already-existing fix?

Reflecting reality. This part of User/session handling has already been overhauled in 1.27 anyways.