Problem/Motivation
Getting unserialize warning whenever loading to user session screen
Steps to reproduce
Go to the user session page user/[uid]/sessions. You will see notice displays on the top.
Warning: unserialize(): Extra data starting at offset 183 of 318 bytes in Drupal\session_inspector\SessionUnserializer::unserializePhp() (line 66 of modules/contrib/session_inspector/src/SessionUnserializer.php).
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2024-04-19 at 17.53.32.png | 81.96 KB | manish.jain |
Comments
Comment #2
manish.jain commentedComment #3
manish.jain commentedComment #4
philipnorton42 commentedComment #5
philipnorton42 commentedThanks for the bug report!
It looks like the "php" session.serialize_handler doesn't work correctly. It is needed to read the data held in other sessions and pick out data like the user agent and masqurade settings.
Looking at the strings in the session data is doesn't look like using string positions is the best way to go about things. I think a better way is to use the session_decode() method since that is built into PHP and should be able to read the session data correctly. I needed to get around the fact that this method alters the current session and use a temporary session to grab hold of the data.
Change incoming :)
Comment #7
philipnorton42 commentedChange committed and released as 1.0.5 (https://www.drupal.org/project/session_inspector/releases/1.0.5)
Thanks!
Comment #8
philipnorton42 commented