[Tickets #2789] NEW: pgsql session handler isn't binary safe

bugs@bugs.horde.org bugs at bugs.horde.org
Sat Oct 15 02:30:28 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=2789
-----------------------------------------------------------------------
 Ticket             | 2789
 Created By         | cbs at cts.ucla.edu
 Summary            | pgsql session handler isn't binary safe
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | Unconfirmed
 Priority           | 3. High
 Type               | Bug
 Owners             | 
+New Attachment     | pgsql.php.diff
-----------------------------------------------------------------------


cbs at cts.ucla.edu (2005-10-15 02:30) wrote:

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.




More information about the bugs mailing list