? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
12 May 2021

Pull Request for Issue #33740 .

Alternative to #33787 and #33817 .

Summary of Changes

When reading the session id from the session table on a PostgreSQL database using loadColumn(), the result is an array of resources and not of strings.

This PR here adds a check in the destroySessions routine of the session manager if the session ID is of type resource and the resource type is a stream, and if that is the case, reads the stream and use the result string for the destroySession call.

Testing Instructions

See issue #33740 .

Actual result BEFORE applying this Pull Request

See issue #33740 .

Expected result AFTER applying this Pull Request

No errors. Session destroyed correctly. Now back at the login screen.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 12 May 2021
avatar richard67 richard67 - change - 12 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 May 2021
Category Libraries
avatar richard67
richard67 - comment - 12 May 2021

Added release blocker label as inherited from the issue.

avatar joomdonation joomdonation - test_item - 12 May 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 12 May 2021

I have tested this item successfully on fc07b6e

Tested on both MySQLi and PostgreSQL.


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

avatar PhilETaylor
PhilETaylor - comment - 12 May 2021

You gained a badge of honour... (@rdeutz)

Screenshot 2021-05-12 at 11 46 40

avatar richard67
richard67 - comment - 12 May 2021

@SharkyKZ How should it be done in the right way?

avatar richard67
richard67 - comment - 12 May 2021

@PhilETaylor No need to ping Robert. Maybe we get some info why, or not. Let's wait and see what happens. I am really not the PHP guru, so I'm always open for suggestions/change requests/critics, from whomever it comes.

avatar PhilETaylor
PhilETaylor - comment - 12 May 2021

I'm always open for suggestions/change requests/critics, from whomever it comes.

But it never comes. Thats the problem.

Its so disrespectful to simply thumb down PR's - constantly - with zero feedback and zero input. He has been banned and warned about his actions previously, but it seems he has not learned his lesson.

avatar PhilETaylor
PhilETaylor - comment - 12 May 2021

The docblock states that the input to this method should be an array of strings, so I guess doing the conversion where you are goes against that, because they should be strings before this method is called - according to the documented param - but, as in all the docs in joomla methods, they could be wrong and can be changed.

 * @param   string[]  $sessionIds  The session IDs to destroy.
avatar richard67
richard67 - comment - 12 May 2021

If @alikon 's PR #33817 doesn't get a thumb down in a while, and Nicola adds the change at the other place which I have mentioned there with a comment. then I am happy to close this one in favour of Nicola's.

avatar richard67
richard67 - comment - 12 May 2021

Closing in favour or #33817 .

avatar richard67 richard67 - change - 12 May 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-05-12 12:05:06
Closed_By richard67
Labels Added: ? ?
avatar richard67 richard67 - close - 12 May 2021

Add a Comment

Login with GitHub to post a comment