You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Db session adapter with Postgresql the session fails to be written and read properly.
The adapter serializes the session->data and tries to store the result in a text field. The serialized session->data text has null bytes. Postgresql is omitting everything after the first null byte resulting in cropped session->data that cannot be read, rendering the whole component unusable.
A quick dirty fix I have used to overcome the issue:
Use a json type field for the data field in the DB session table.
json_encode() the session->data prior to writing it to db (json_decode the data after reading it respectively ).
Expected and Actual Behavior
When using the Db session adapter with Postgresql the session fails to be written and read properly.
The adapter serializes the
session->data
and tries to store the result in a text field. The serializedsession->data
text has null bytes. Postgresql is omitting everything after the first null byte resulting in croppedsession->data
that cannot be read, rendering the whole component unusable.A quick dirty fix I have used to overcome the issue:
data
field in the DB session table.As demonstrated in this gist.
Steps to reproduce:
session->data
has been corrupted while being saved to the db.Details
The text was updated successfully, but these errors were encountered: