No Code Attached Yet bug
avatar davichos
davichos
11 Jun 2020

Steps to reproduce the issue

  1. Set one user to require/reset in administrator mode
  2. Login with the user to reset password
  3. Not do nothing, just try logout
  4. The user can't logout

Expected result

The user be able to logout

Actual result

The user canĀ“t logout until reset password

System information (as much as possible)

Joomla Version 3.8+
PHP 7.1 +
PHP 7.2 +
PHP 7.3 +
PHP 7.4 +

Additional comments

I solved the problem editing the file libraries/src/Application/SiteApplication.php
change the line 230 in version 3.9.19

$this->checkUserRequireReset('com_users', 'profile', 'edit', 'com_users/profile.save,com_users/profile.apply,com_users/user.logout');

for
$this->checkUserRequireReset('com_users', 'profile', 'edit', 'com_users/profile.save,com_users/profile.apply,com_users/user.logout,com_users/user.menulogout');

avatar davichos davichos - open - 11 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Jun 2020
avatar richard67
richard67 - comment - 12 Jun 2020

@SniperSister Is there any security reason that a user who logged in for a password reset can't log out anymore until having done the reset?

avatar richard67
richard67 - comment - 12 Jun 2020

@zero-24 Same question to you: Is there any security reason that a user who logged in for a password reset can't log out anymore until having done the reset?

avatar SharkyKZ
SharkyKZ - comment - 12 Jun 2020

Based on code review, user can logout, just not when using Logout menu item type in com_users. Must have been an oversight when menu item was added. So the fix should be valid.

avatar richard67
richard67 - comment - 12 Jun 2020

@davichos Do you want to make a pull request with your change? Or do you prefer someone else to do it?

avatar zero-24
zero-24 - comment - 13 Jun 2020

@zero-24 Same question to you: Is there any security reason that a user who logged in for a password reset can't log out anymore until having done the reset?

I'm not aware of any but that feature was initial developed by Michael and IIRC uses an whitelist of pages that are still allowed. I personally would argue that when you logged in and you are required to reset your PR you should change it than.

avatar brianteeman
brianteeman - comment - 13 Jun 2020

I'm with @zero-24 why would you not want to change it.

avatar Quy
Quy - comment - 29 Jul 2020

So is this a won't fix?

avatar HLeithner
HLeithner - comment - 29 Jul 2020

Looks more like a bug looking at the provided source line (and fix)
$this->checkUserRequireReset('com_users', 'profile', 'edit', 'com_users/profile.save,com_users/profile.apply,com_users/user.logout');

if I understand it correctly the last entry would mean logout is allowed.

avatar davichos
davichos - comment - 29 Jul 2020

@richard67 i prefer someone else do it

avatar Quy Quy - change - 29 Jul 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-07-29 17:42:59
Closed_By Quy
avatar Quy Quy - close - 29 Jul 2020
avatar Quy Quy - change - 4 Sep 2020
Status Closed New
Closed_Date 2020-07-29 17:42:59
Closed_By Quy
avatar Quy Quy - reopen - 4 Sep 2020
avatar brianteeman
brianteeman - comment - 28 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

This issue is still relevant for Joomla 4 BUT the fix etc here is not suitable for Joomla 4

avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 20 Feb 2023

Add a Comment

Login with GitHub to post a comment