? ? Pending

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
3 Jun 2017

Pull Request for Issue #16477.

Summary of Changes

PHP Files handler (and maybe other handlers) emit a warning when clearing the session.
This PR try to solves that.

Testing Instructions

  1. Use latest staging
  2. Login in backend
  3. Set the session handler to PHP (files handler)
  4. Set session timeout to 1 minute (for faster test)
  5. Wait around a minute
  6. Refresh the page you will get a php warning

Apply path and try again, should work.

Expected result

Working as usual.

Actual result

Warning: session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /path/to/joomla/staging/libraries/joomla/session/handler/native.php on line 260

Documentation Changes Required

None

@mbabker @wilsonge please check.

avatar andrepereiradasilva andrepereiradasilva - open - 3 Jun 2017
avatar andrepereiradasilva andrepereiradasilva - change - 3 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2017
Category Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 3 Jun 2017
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 3 Jun 2017
avatar mbabker
mbabker - comment - 3 Jun 2017

Looks fine, but it is an issue we should look into some more to make sure there aren't any deeper problems.

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

ok, aditional info: in http://php.net/manual/en/function.session-id.php

If id is specified, it will replace the current session id. session_id() needs to be called before session_start() for that purpose. Depending on the session handler, not all characters are allowed within the session id. For example, the file session handler only allows characters in the range a-z A-Z 0-9 , (comma) and - (minus)!

avatar mbabker
mbabker - comment - 3 Jun 2017

IIRC we are MD5 hashing session names in the session instantiation code (no idea how that ties into ID generation). So it should be fine. Otherwise, with 3.8, I do see possible issues the default value uses the class name which now has a namespace separator (\) in it.

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Jun 2017

@mbabker @wilsonge @rdeutz just a reminder that IMHO 3.7.3 should not be released without addressing this issue.

avatar rdeutz rdeutz - assigned - 9 Jun 17
avatar Quy
Quy - comment - 9 Jun 2017

I have tested this item successfully on 4f87c46


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16481.

avatar Quy Quy - test_item - 9 Jun 2017 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Jun 2017

Can anyone put a releaase blocker label?

avatar rdeutz
rdeutz - comment - 14 Jun 2017

It is just a warning and doesn't limit the functionality of the website so this isn't a release blocker in my opinion.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Jun 2017

I have tested this item successfully on 4f87c46


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16481.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 14 Jun 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Jun 2017

RTC after two successful tests.

avatar infograf768
infograf768 - comment - 15 Jun 2017

@rdeutz
It is a bit more than a Warning.
I also get here
Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/Applications/MAMP/htdocs/testwindows/trunkgitnew/libraries/joomla/session/handler/native.php" at line 260.
patch tested OK

avatar rdeutz rdeutz - change - 15 Jun 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-15 06:41:42
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 15 Jun 2017
avatar rdeutz rdeutz - merge - 15 Jun 2017

Add a Comment

Login with GitHub to post a comment