? ? Failure

User tests: Successful: Unsuccessful:

avatar durubayram
durubayram
23 Jul 2018

Pull Request for Issue #15839

Steps to reproduce the issue

  1. Create a menu link to a single article with Access set to Registered (e.g. /test)
  2. Enable System - Language Filter plugin
  3. Go to System -> Global configuration -> System
  4. Set the Session Lifetime to 1 minute

image

  1. Save the change
  2. Login on frontend with "Remember me" checkbox ticked
  3. Wait 1 minutes for session to expire ;)
  4. Visit the protected page (e.g. /en/test)
  5. You get a message saying you are not authorized to view the page
  6. Apply the patch
  7. Login on frontend with "Remember me" checkbox ticked
  8. Wait 1 minutes for session to expire ;)
  9. Visit the protected page (e.g. /en/test)

#Expected result
You should be automatically logged in and land on open protected page.

Actual result
You are redirected to frontpage with message:
Error: You are not authorised to view this resource.
If your homepage requires access then you end up on 403 page.

System information (as much as possible)
What happens is that the language filter plugin builds the menu with access levels before the remember plugin had a chance to login the user. The menu is built with access levels of the guest user and updates only on refresh. So, on first visit, after the session expires, the menu thinks it's a guest and denies the access.

The quick fix is to re-build the menu after the remember plugin has logged in the user.
Here is the Gist, line 66: https://gist.github.com/sakicnet/f2b8e2486011093d08e544423d8e5124

avatar durubayram durubayram - open - 23 Jul 2018
avatar durubayram durubayram - change - 23 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jul 2018
Category Libraries Front End Plugins
avatar durubayram durubayram - test_item - 23 Jul 2018 - Tested successfully
avatar durubayram
durubayram - comment - 23 Jul 2018

I have tested this item successfully on cee4dfd


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

avatar brianteeman
brianteeman - comment - 23 Jul 2018

Please update the original post with a description of the issue and instructions on how to test and please give it a meaningful title.

Also we assume that you wont submit none working code so there is no need (or meaning) in submitting test results yourself

avatar infograf768
infograf768 - comment - 23 Jul 2018

hmmm. the original pr should be closed if this one, once corrected, goes in.
#15839

avatar roland-d roland-d - change - 24 Jul 2018
Title
Updated #15839
Fix for 403 error on session timeout Updated #15839
avatar roland-d roland-d - edited - 24 Jul 2018
avatar roland-d roland-d - change - 24 Jul 2018
Title
Updated #15839
Fix for 403 error on session timeout Updated #15839
avatar durubayram durubayram - change - 24 Jul 2018
Labels Added: ?
avatar roland-d roland-d - change - 24 Jul 2018
The description was changed
avatar roland-d roland-d - edited - 24 Jul 2018
avatar durubayram durubayram - change - 24 Jul 2018
The description was changed
avatar durubayram durubayram - edited - 24 Jul 2018
avatar roland-d
roland-d - comment - 24 Jul 2018

@Tchangue @priiish Can you please test this one again? Thank you.

avatar fatmaakay fatmaakay - test_item - 24 Jul 2018 - Tested successfully
avatar fatmaakay
fatmaakay - comment - 24 Jul 2018

I have tested this item successfully on f9e71c4


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

avatar priiish priiish - test_item - 24 Jul 2018 - Tested successfully
avatar priiish
priiish - comment - 24 Jul 2018

I have tested this item successfully on f9e71c4


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jul 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Jul 2018

Ready to Commit after two successful tests.

avatar mbabker
mbabker - comment - 25 Jul 2018

There is no way this can be RTC. The added setUser() method is on the JHtmlMenu class, which is NOT what you get when calling Joomla\CMS\Application\CMSApplication::getMenu().

avatar Quy Quy - change - 26 Jul 2018
Status Ready to Commit Pending
avatar Quy
Quy - comment - 26 Jul 2018

Removed RTC as stated.


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

avatar roland-d roland-d - alter_testresult - 26 Jul 2018 - fatmaakay: Not tested
avatar roland-d roland-d - alter_testresult - 26 Jul 2018 - priiish: Not tested
avatar roland-d
roland-d - comment - 26 Jul 2018

@fatmaakay @priiish Your tests were not correct I am afraid as you should have seen a fatal error. Now with the updated code, please test again and follow the instructions step by step.

avatar roland-d roland-d - change - 26 Jul 2018
The description was changed
avatar roland-d roland-d - edited - 26 Jul 2018
avatar roland-d roland-d - change - 26 Jul 2018
The description was changed
avatar roland-d roland-d - edited - 26 Jul 2018
avatar infograf768 infograf768 - test_item - 26 Jul 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 26 Jul 2018

I have tested this item successfully on c7eab13

This time it works and no error either in languagefilter. ?


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

@infograf768 will test at Weekend.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

Can't get Error, i stay logged in after a few Minutes if i click on Menu having ACL "Registered". Language Filter-Plugin is enabled and in Frontend-Login "Remeber me" is ticked. Session Timeout seems to work only in Backend.

[Edit]: I used "Working on Your Site"-Menu in Author-Menu changed to Access "Registered".

avatar roland-d
roland-d - comment - 27 Jul 2018

@franz-wohlkoenig You don't get any timeout on your front-end?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

@roland-d get no timeout in Frontend, only in backend.

System information

  • 3.8.11-dev
  • Template: Protostar
  • macOS Sierra, 10.13.6
  • Firefox 61 (64-bit)

CloudAccess.net

  • PHP 7.1.15
  • MySQLi 5.7.18-cll-lve
avatar roland-d
roland-d - comment - 27 Jul 2018

@franz-wohlkoenig That must be another issue then, because the timeout should work regardless of this PR.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

i thought its another cloudaccess-Issue.

avatar infograf768
infograf768 - comment - 27 Jul 2018

@franz-wohlkoenig
Have you deleted the session in the table?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

No, have followed Instructions.

avatar infograf768
infograf768 - comment - 27 Jul 2018

Wait 1 minutes for session to expire ;)

I would definitely make sure the sesion is deleted. :)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2018

Then i suggest that this Information should be added to Instructions as not all Tester have the Knowledge what to do or which table is meant.

avatar brianteeman
brianteeman - comment - 27 Jul 2018

If the only way is to delete them.from.yhe database.then there is something wrong

avatar roland-d
roland-d - comment - 27 Jul 2018

I tested the timeout and I am logged out once the time is expired.

avatar sanderpotjer
sanderpotjer - comment - 8 Sep 2018

I have tested this item ? unsuccessfully on c7eab13

Against the current staging branch I cannot reproduce the issue as described in the description. So at the moment it looks like this patch is not needed (or the instruction to reproduce this should be updated).


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

avatar sanderpotjer sanderpotjer - test_item - 8 Sep 2018 - Tested unsuccessfully
avatar rgrmf
rgrmf - comment - 12 Jan 2019

We are experiencing the problem described by durubayram, as indicated until step 9 in the first post. We have a multi-language site, and we are getting the "You are not authorized" error all the time.

However, we tested the patch c7eab13, but it didn't seem to fix the issue.

We are interested in fixing this issue, but I'm afraid I can't contribute to it as I'm not a programmer myself. I'm very happy however to run new tests or help in other ways to fix it.

(First post here on Github, please excuse if there's something wrong)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Apr 2019

@HLeithner can you please decide how to go on?

avatar HLeithner
HLeithner - comment - 1 May 2019

seems this pr doesn't solve the problem completely, maybe @sanderpotjer can help fixing it?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 May 2019

I suggest to close this PR due the lack of response. In the meantime i add the label "needs new owner".

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Jul 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-07-21 05:05:35
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig franz-wohlkoenig - close - 21 Jul 2019
avatar juuser99
juuser99 - comment - 30 Dec 2019

This solved the problem for me also. Will this be added to Joomla production version anytime? In 3.9.14 still missing.

avatar juuser99
juuser99 - comment - 21 Jun 2020

Why is this not added to Joomla core? Above mentioned changes to AbstractMenu.php and remember.php solved issues on all my sites and appearently also for other people. Pretty annoying to hack the core files after every update.

avatar jjbongio
jjbongio - comment - 15 Jul 2020

These changes were incorporated into the 3.9.20 release but did not fix the problem. Oddly, applying these fixes to the 3.9.19 release fixed the problem, but the problem reappeared with the 3.9.20 release. The above fix worked on all my sites for 3.9.19 but the base 3.9.20 fails in the original manner on all.

avatar SharkyKZ
SharkyKZ - comment - 15 Jul 2020

These changes are not present in 3.9.20.

avatar juuser99
juuser99 - comment - 25 Aug 2020

Damn, these changes fixed the issue for 3.9.19, but applying the same changes to 3.9.20 doesn't eliminate the problem anymore. That is a real showstopper when users get "Error 403" all the time. This is a really serious thing for me :(

avatar jjbongio
jjbongio - comment - 26 Aug 2020

The changes fix it for me on both 3.9.20 and 3.9.21 (no changes in either module between these releases). I was seeing it all the time, and it's been gone since I applied these.

avatar juuser99
juuser99 - comment - 26 Aug 2020

Thank for reply. I made a stupid mistake twice applying it to 3.9.20 :) It indeed works. It's a pity that the fix still hasn't made into the Joomla core.

avatar AndySDH
AndySDH - comment - 7 Oct 2020

This needs to be re-opened and merged.

See: #30980
And: #11541

This is also an issue in Joomla 4.

Add a Comment

Login with GitHub to post a comment