? ? Failure

User tests: Successful: Unsuccessful:

avatar asika32764
asika32764
4 Nov 2018

Move the return line into if block.

I found that if plugin return FALSE from onUserBeforeLogin, Application will still return true. This situation should mark as failure and goto onUserLoginFailure.

avatar asika32764 asika32764 - open - 4 Nov 2018
avatar asika32764 asika32764 - change - 4 Nov 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2018
Category Libraries
avatar asika32764 asika32764 - change - 4 Nov 2018
Labels Added: ?
avatar bembelimen
bembelimen - comment - 19 Nov 2018

Did you check what happens if one login works (e.g. the default Joomla! login) and another fails...? Is the user logged in after?

avatar asika32764
asika32764 - comment - 19 Nov 2018

Must test in a custom plugin or custom login code. This issue will only happened if a developer attempts to use $app->login() to make their own login flow in 3rd party components.

I'm still thinking how to attach simple code to reproduce this issue.

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[Fix] If plugins return false when login, should mark as failure.
If plugins return false when login, should mark as failure.
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Apr 2019

@asika32764 whats the state of this Pull Request?

avatar SharkyKZ
SharkyKZ - comment - 25 Apr 2019

To reproduce the issue in core:

Enable System - User Log plugin.
Try to login to administrator area with unauthorized user (should see You do not have access to the Administrator section of this site. message).
Check administrator/logs/error.php log. The login failure should be logged but it's not.

avatar SharkyKZ
SharkyKZ - comment - 25 Apr 2019

I have tested this item successfully on c6fccec


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

avatar SharkyKZ SharkyKZ - test_item - 25 Apr 2019 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Apr 2019

@SharkyKZ thanks for the clear Test Instructions. At CloudAccess i have to upgrade to unlock Logs, so can't test.

avatar infograf768 infograf768 - change - 25 Apr 2019
Labels Removed: J3 Issue
avatar asika32764
asika32764 - comment - 25 Apr 2019

Thanks @SharkyKZ

I'm trying to create a plugin to reproduce this issue but your way is more simpler to test.

avatar Quy
Quy - comment - 8 May 2019

I have tested this item successfully on e5a7c2d


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

avatar Quy Quy - test_item - 8 May 2019 - Tested successfully
avatar Quy Quy - change - 8 May 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 May 2019

RTC


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

avatar Quy
Quy - comment - 8 May 2019

RTC


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

avatar SniperSister SniperSister - change - 8 May 2019
Labels Added: ?
avatar HLeithner HLeithner - change - 5 Jun 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-05 16:50:01
Closed_By HLeithner
avatar HLeithner HLeithner - close - 5 Jun 2019
avatar HLeithner HLeithner - merge - 5 Jun 2019
avatar HLeithner
HLeithner - comment - 5 Jun 2019

thx

Add a Comment

Login with GitHub to post a comment