1

I have a site that is implemented in Joomla 3.1.5 on which the following are installed

http://www.joomlart.com/joomla/templates/ja-muzic --> This is the theme
http://www.jomsocial.com/ --> Used as the community plugin
http://www.kunena.org/ --> The forums plugin
http://getk2.org/blog --> The Blog plugin

Of course there are some custom components and modules that are implemented.

The issue i am facing is that there is some kind of conflict happening between the sessions i think. What happens is that the session times out randomly or i get a error message as "Invalid Token". All this even when the pages is being used continuously.

I have checked the value in the back-end config , Session Lifetime is set to 60 and Session Handler is set to Database

Let me know if you need more info.

Any help or direction would be appreciated.

Thanks

1 Answer 1

2

To prevent simple CSRF attacks, request tokens are added to forms in the front-end and back-end Joomla! interfaces. http://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms

If there's a change in the user session, tokens can be lost or renewed. Examples:

  • When the browsing session ends, session cookie is lost. If you access again, then a new token is issued for the new session
  • When a user is authenticated, a new token is created. Unauthenticated pages can't submit forms with the previous token.

A way to reproduce the "Invalid Token" error: open two tabs to the same site, login into the site in one tab, and try to search anything in the second tab. As the first tab invalidates the first token and generates a new token, then the second tab, still having the first token in the search form, can't submit a query successfully.

3
  • Thanks for the reply. But i kinda know why invalid token comes up. The issue in my case is that it happens randomly in the same tab while browsing thru may links. The worst is when it happens while logging in and out of the site.
    – sandy.sk
    Jul 8, 2014 at 13:37
  • Yes, it happends when you log in and out of the site. But not if you have only one tab.
    – Anibal
    Jul 8, 2014 at 23:52
  • I would try to upgrade Joomla as well, from 3.1.5 its not too bad but could help (though its just one of the things that "could" fix it). If not there is the issue that the tokens can expire, so if left on one page for long enough the token can expire, if the pages rely on forms to go from place to place this can become problematic (as in more then just a search form or contact form, depends on the site). Jul 9, 2014 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.