Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2.0] checkToken falling into infinite loop of new session #38646

Open
Chaosxmk opened this issue Aug 30, 2022 · 2 comments
Open

[4.2.0] checkToken falling into infinite loop of new session #38646

Chaosxmk opened this issue Aug 30, 2022 · 2 comments

Comments

@Chaosxmk
Copy link

Steps to reproduce the issue

  1. Perform an action that passes through Joomla\CMS\MVC\Controller\BaseController::checkToken() or Joomla\CMS\Session\Session::checkToken()

Expected result

Token is verified as valid or invalid

Actual result

Occasionally, token is becomes trapped inside if ($app->getSession()->isNew()) {, never generating a new token nor validating it.

Additional comments

This is quite possibly the most aggravating bug I keep inducing accidentally. I have no idea what it is exactly that I'm doing to trip it, but after a lot of debugging I've noted that in Joomla\CMS\Session\Session::checkToken(), I always fall into if ($app->getSession()->isNew()) {, then when retrying to check the token, it repeats itself. The only solution I've found to "fix" the session is completely empty the session table in the database and delete all cookies/session variables and refresh the page.

I don't expect anyone could solve this considering I can't narrow down a reproduce-able list of steps to take, but I'm reporting it just in case someone can.

@Chaosxmk Chaosxmk changed the title [4.2.0] [4.2.0] checkToken falling into infinite loop of new session Aug 30, 2022
@Hackwar Hackwar added the bug label Feb 17, 2023
@Hackwar
Copy link
Member

Hackwar commented Mar 28, 2024

Do you still have this issue? I went through the code and can't see an issue there. ☹️

@Chaosxmk
Copy link
Author

Chaosxmk commented Apr 4, 2024

On very rare occasions, I've had the bug recur, but I'm never able to properly reproduce the issue intentionally, nor am I able to diagnose the issue further that what I noted in the initial issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants