Breaking change to format of datasource-stored session data

60 views
Skip to first unread message

Juan Aguilar

unread,
Mar 15, 2017, 11:56:32 AM3/15/17
to Lucee
Hello,

We've been holding off on upgrading to 5.x due to PDF issues and are testing the latest release but have come across a new issue. Due to issues with SessionInvalidate and SessionRotate when using datasource-stored sessions, we've needed to read the session data from an old session straight from the cf_session_data table.

I'm not sure when this started but now the session data (stored as a string) is prepended with "struct:{". This throws an error if you try to Evaluate the string into a struct.

If I get the session data in a query named "getOldSession", I used to be able to do this:

objSessionData = Evaluate(getOldSession.data);

but this throws a "lucee.runtime.interpreter.InterpreterException: Syntax Error, invalid Expression" error now.

I can work around the change by doing this:

strOldSessionData = replaceNoCase(getOldSession.data, "struct:{", "{");
objSessionData
= Evaluate(strOldSessionData);

Is replaceNoCase the right way to do this or is there something that I'm missing about the new format for the stored session data?

Thanks,

Juan

Simon Goldschmidt

unread,
Mar 16, 2017, 3:03:34 AM3/16/17
to Lucee
Hi Juan,

We use a datasource for session storage and have had problems with sessions since 5.1.0. We opened this ticket https://luceeserver.atlassian.net/browse/LDEV-1207 and will update with your observations.

Simon

Reply all
Reply to author
Forward
0 new messages