?

User tests: Successful: Unsuccessful:

avatar beat
beat
20 May 2014

This PR proposes to backport to 2.5.x Juser::getInstance(0); fix form Joomla 3.0 Commit c7c3722 (which is an import including Joomla Platform Commit joomla/joomla-platform@0afde04#diff-5954647dc2fd6222bf4424b083506d75 ).

This is triggering a bug in Joomla when someone tries to get an instance of JUser(0) when not logged-in.

To reproduce the bug:

Both Kunena and CB projects ran into this 2.5-only bug during beta tests these last months.

A simple code review will show that this is a no-brainer, and could be a potential security issue if Joomla or an extension tries to instanciate JUser id 0 this way.

avatar beat beat - open - 20 May 2014
avatar beat
beat - comment - 20 May 2014

Link to exact same lines missing in 2.5.x (including 2.5.20) but existing in Joomla 3 since 3.0:
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/user/user.php#L265

avatar roland-d
roland-d - comment - 8 Jun 2014

Cross-posting from JC:
Hello,

I understand the code and see what it does. What I don't see is how I can confirm this in the GUI. What should I see before and after the change?

I don't notice anything out of th ordinary in the Viewing Access Levels.

Some pointers please.

avatar Bakual Bakual - reference | 5e40e23 - 27 Jul 14
avatar Bakual
Bakual - comment - 27 Jul 2014

Merged into 2.5.

avatar Bakual Bakual - change - 27 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-27 17:57:35
avatar Bakual Bakual - close - 27 Jul 2014
avatar Bakual Bakual - close - 27 Jul 2014

Add a Comment

Login with GitHub to post a comment