?
avatar xristoph
xristoph
31 Aug 2016

Steps to reproduce the issue

Registered users log into site. User walks away from computer, returns 24 hours later, wakes up computer and is still logged into site and user is able to perform actions without invalid token message or being asked to log in again.

Expected result

After the session time of 120 minutes in-activity, user session would be forced logged out for any and all users on front-end.

Actual result

User session on front-end does not expire for all users, especially if they're in Kunena forums section of site, or JomSocial area

System information (as much as possible)

joomla 3.5.1
jomsocial 4.2.4
kunena 4.0.11

Additional comments

session handling is set to PHP, have verified users are not saving password (credentials) in browser

avatar xristoph xristoph - open - 31 Aug 2016
avatar mbabker
mbabker - comment - 31 Aug 2016

If you've got the login module in use on the site, this is expected behavior. See #11756 for more info.

avatar xristoph
xristoph - comment - 31 Aug 2016

So the solution is to disable the login form on all pages and just assign to home page? I read that thread and saw it was closed... didn't see resolution, my apologies. Thanksfor your time

avatar BurtNL
BurtNL - comment - 1 Sep 2016

That doesn't sound like a good solution to me. In 3.5.1 this was not necessary at all.

@xristoph: Have you noticed that - while the user in the frontend is still logged in (although the session has expired) - the particular user is no longer visible in the backend as a logged in user? So he's logged in at frontend, but not visible in backend. Can you confirm this?

That's what I see happening in 3.6.2 and I don't think this is expected behaviour (but I could be wrong here).

I have set my project back to 3.5.1, these strange problems have disappeared now. Not sure what is going wrong.


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

avatar brianteeman brianteeman - change - 5 Sep 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 3 Oct 2016
Category Authentication
avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Oct 2016

the keepalive behaviour is being active always in frontend so the session will always persist

Do this, go to frontend, view HTML source (Ctrl + U) and search for "com_ajax" (Ctrl + F) you will notice that on every frontend pages there is a AJAX call every x seconds to session keepalive, this is always renewing the session.

Not sure this is a bug. But in the backend the keepalive only exists when you are editing an item so you don't loss the session before saving.

@mbabker can you confirm this is supposed to be like this?

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Oct 2016

sorry already seem you response. this is expected because of the login form module.

so i think this can be closed

avatar mbabker
mbabker - comment - 5 Oct 2016

TBH, I'm not entirely sure we need to have CSRF protection in front of the logout task, and if you remove that you remove the need for keepalive at least when the login module is displaying the logout stuff.

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Oct 2016

What would be the security implication of not having the CSRF protection in com_users frontend logout task (https://github.com/joomla/joomla-cms/blob/staging/components/com_users/controllers/user.php#L145)?

Anyway we could at least only render the keepalive script when the user is logged, right?

avatar mbabker
mbabker - comment - 5 Oct 2016

You need the keepalive for guests too. Otherwise if someone sits on the page too long then tries to log in they get the invalid token message. Right now when you display the login module you have to accept that keepalive will always be there.

As for security stuff, Symfony's default security config doesn't use CSRF in front of the logout task. If it's good enough for them...

avatar PhilETaylor
PhilETaylor - comment - 2 Nov 2016

Based on a quick google of other apps I think we need to add csrf to the logout links - however anal that is... :-(
https://www.drupal.org/node/144538
https://code.djangoproject.com/ticket/15619
https://blog.codinghorror.com/cross-site-request-forgeries-and-you/


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

avatar brianteeman brianteeman - close - 9 Dec 2016
avatar brianteeman brianteeman - change - 9 Dec 2016
The description was changed
Status New Expected Behaviour
Closed_Date 0000-00-00 00:00:00 2016-12-09 12:35:14
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 9 Dec 2016

As stated above this is the expected behaviour. I am closing this


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

avatar brianteeman brianteeman - edited - 9 Dec 2016

Add a Comment

Login with GitHub to post a comment