Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

A user.logout doesn't work anymore with the CSRF token changes in issue 144538

$
0
0

Problem/Motivation

The changes made in issue https://www.drupal.org/project/drupal/issues/144538 do not work quite correctly.
When creating a logout link, the token parameter is always outdated. Even if it is changed from the default using $this->csrfToken->get('user/logout'), in $this->csrfToken->validate($request->query->get('token', '') , $path) we always get false because $seed = $this->sessionMetadata->getCsrfTokenSeed() constantly returns different values for every request ​​and at the time of checking the token from the link is already out of date. We always get a confirmation form to log out.

Steps to reproduce

Use the debugger to check for $seed values from CsrfAccessCheck->access (line 65) CsrfTokenGenerator->validate $seed from line 85 ​​on multiple page reloads. For example, it can be clicking the logout button on the main page.


Viewing all articles
Browse latest Browse all 294288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>