6.0.0-git
2021-01-18

[#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 2004-03-30 (6138 days ago)
Due
Updated 2004-03-30 (6138 days ago)
Assigned
Resolved 2004-03-30 (6138 days ago)
Milestone
Patch No

History
2004-03-30 16:58:51 Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Fix committed to CVS - thanks!
2004-03-30 13:39:22 kenneyw (at) first8 (dot) nl Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 3. High
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