?
avatar pabloarias
pabloarias
6 Jul 2017

Steps to reproduce the issue

  1. Install Joomla 3.7.3.
  2. Add variable $root_user to configuration.php with a username of your site.
  3. Publish a module with non public permissions.

Expected result

The module will be not visible by public users or guest.

Actual result

The module is shown to public users or guest.

System information

Joomla 3.7.3
PHP 5.6 or 7

Additional comments

It seems that the error is in libraries/joomla/access/access.php line 1074:

if ($root_user && ($root_user == $user->username || $root_user == $user->id))

I think we are trying to check $root_user against a string and an int

avatar pabloarias pabloarias - open - 6 Jul 2017
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jul 2017
avatar wojsmol
wojsmol - comment - 6 Jul 2017

@izharaazmi Plese look on this as you wrote this chenge.

avatar brianteeman
brianteeman - comment - 6 Jul 2017

Root user is only intended to be used in order to reset super user access. It should NEVER be left enabled after super user access has been regained.

avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Jul 2017
Category ACL com_users
avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Jul 2017
Status New Discussion
avatar pabloarias
pabloarias - comment - 6 Jul 2017

I agree, it should never be left enabled but, during the process, private content shouldn't be public.

avatar Artwebco
Artwebco - comment - 6 Jul 2017

I am faced with the same issue, is there any solution?

avatar ggppdk
ggppdk - comment - 7 Jul 2017

There is a string with int comparison in the code

"somename" == 0
will return true,
because "somename" typecasted to integer is 0 , thus you get
0 == 0

I have made a PR

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jul 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-07-07 05:11:49
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jul 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 7 Jul 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jul 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jul 2017

closed as having PR #17011


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

Add a Comment

Login with GitHub to post a comment