6.0.0-beta1
7/17/25

[#44] Postgres Session Serialization strips char
Summary Postgres Session Serialization strips char
Queue Horde Base
Queue Version 2.2.5
Type Bug
State Resolved
Priority 3. High
Owners
Requester kenneyw (at) first8 (dot) nl
Created 03/30/2004 (7779 days ago)
Due
Updated 03/30/2004 (7779 days ago)
Assigned
Resolved 03/30/2004 (7779 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/30/2004 04:58:51 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Fix committed to CVS - thanks!
03/30/2004 01:39:22 PM kenneyw (at) first8 (dot) nl Comment #1
State ⇒ Unconfirmed
Priority ⇒ 3. High
Type ⇒ Bug
Reply to this comment
I will describe symptoms, cause and fix (at least for my system):



** Symptoms:



Some links (the Password link for instance) don't work: you are 
redirected back to /imp/mailbox.php. (After debugging I found that 
Auth::getAuth() didn't work

after the first time)





** CAUSE



horde/lib/SQL.php, line 64, strips the first two chars of the value of 
the session_data column (horde_sessionhandler table).



This only occurs when you use pgsql as dbsyntax (line 63: case 'pgsql': ).

This is strange since the store-code does not prepend any characters. 
This seems to be a hack circumventing some problem (hard to believe it 
is a deliberate bug!).



B.t.w., we use PostgreSQL 7.4.1, and the table looks like:



horde=# \d horde_sessionhandler

            Table "public.horde_sessionhandler"

         Column        |         Type          | Modifiers

----------------------+-----------------------+-----------

  session_id           | character varying(32) | not null

  session_lastmodified | integer               | not null

  session_data         | bytea                 |





** FIX:



replace

    $data = substr($result, 2);

by

    $data = $result;







Greetings,



    Kenney Westerhof

Saved Queries