6.0.0-beta1
8/9/25

[#2789] pgsql session handler isn't binary safe
Summary pgsql session handler isn't binary safe
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners chuck (at) horde (dot) org
Requester cbs (at) cts (dot) ucla (dot) edu
Created 10/15/2005 (7238 days ago)
Due
Updated 10/15/2005 (7238 days ago)
Assigned 10/15/2005 (7238 days ago)
Resolved 10/15/2005 (7238 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/15/2005 08:35:15 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Committed, thanks.
10/15/2005 07:54:57 PM Chuck Hagenbuch Assigned to Chuck Hagenbuch
State ⇒ Assigned
 
10/15/2005 09:30:25 AM cbs (at) cts (dot) ucla (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ pgsql session handler isn't binary safe
Queue ⇒ Horde Framework Packages
New Attachment: pgsql.php.diff Download
Reply to this comment
The pgsql session handler isn't binary safe. The horde_sessionhandler 
table defines session_data as a text field.  Imp inserts null 
characters, which cause the session to be read back incorrectly, 
effectively causing the in-progress session to be trashed and restarted.



The attached patch applies against HEAD.  It does a bin2hex() before 
session data is inserted in pgsql.php:write() and a pack("H*", ...) 
before the session data is returned in pgsql.php:read().



With this fix postgres sessions are working for all of the 
applications I have installed (imp, nag, turba, kronolith, gollem).



The real fix is probably to fix the horde_sessionhandler table to use 
a byte array data type.

Saved Queries