Summary | Horde_Session vs Horde_Notification |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | jan (at) horde (dot) org |
Created | 10/20/2010 (5371 days ago) |
Due | |
Updated | 10/21/2010 (5370 days ago) |
Assigned | 10/20/2010 (5371 days ago) |
Resolved | 10/21/2010 (5370 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Bug #9313: Fix logintask confirmationSession data type might change - if it changes from array/object to
scalar, remove the typehint declaration stored in the session.
Possibly fixes
Bug #9324Possibly fixes
Bug #9325http://git.horde.org/diff.php/framework/Core/lib/Horde/Session.php?rt=horde-git&r1=0ab36983a478f9137f04e428f85ccd389e617710&r2=6d69e71624b0a9bcc47b62d64c4f0e002b64fbe0
$events = $session['horde:notify/' . $listener . ';array'];
$events[] = $event;
$session['horde:notify/' . $listener . ';object'] = $events;
</code>
The entity being serialized is the array returned from the first
assignment (and appended to on the second line).
it needs to be serialized to maintain the object.
Here's what my notification session entry looks like:
a:2:{i:0;O:30:"Horde_Core_Notification_Status":5:{s:12:"?*?_coreDict";O:25:"Horde_Translation_Gettext":2:{s:10:"?*?_domain";s:10:"Horde_Core";s:11:"?*?_gettext";b:1;}s:7:"charset";s:5:"UTF-8";s:7:"message";s:3:"foo";s:5:"flags";a:0:{}s:4:"type";s:12:"horde.notice";}i:1;O:30:"Horde_Core_Notification_Status":5:{s:12:"?*?_coreDict";O:25:"Horde_Translation_Gettext":2:{s:10:"?*?_domain";s:10:"Horde_Core";s:11:"?*?_gettext";b:1;}s:7:"charset";s:5:"UTF-8";s:7:"message";s:3:"foo";s:5:"flags";a:0:{}s:4:"type";s:12:"horde.notice";}}
is, it's serializing an array, not an object:
<code>
$events = $session['horde:notify/' . $listener . ';array'];
$events[] = $event;
$session['horde:notify/' . $listener . ';object'] = $events;
</code>
The entity being serialized is the array returned from the first
assignment (and appended to on the second line).
Horde_Core_Notification_Storage_Session is designed to prevent:
line 59: $session['horde:notify/' . $listener . ';object'] = $events;
This tells the session handler to force save this entry as an object
(using serialization) rather than doing type checking (which would
return array which would cause it to be json encoded). This is
probably a good place to start debugging- it works perfectly for me
here.
notification event object.
Priority ⇒ 2. Medium
State ⇒ Feedback
on line 303?
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Horde_Session vs Horde_Notification
Queue ⇒ Horde Framework Packages
Assigned to Michael Slusarz
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
I see this when logging in to the portal:
[Wed Oct 20 16:48:11 2010] [error] [client 192.168.60.116] PHP Notice:
Trying to get property of non-object in
/home/jan/horde-git/framework/Notification/lib/Horde/Notification/Handler.php
on line 303, referer:
http://neo.wg.de/headhorde/login.php?Horde=s3k1hnavnpp24672atoifp3mo1
[Wed Oct 20 16:48:11 2010] [error] [client 192.168.60.116] PHP Stack
trace:, referer:
http://neo.wg.de/headhorde/login.php?Horde=s3k1hnavnpp24672atoifp3mo1
[Wed Oct 20 16:48:11 2010] [error] [client 192.168.60.116] PHP 1.
{main}() /home/jan/horde-git/horde/services/portal/index.php:0,
referer:
http://neo.wg.de/headhorde/login.php?Horde=s3k1hnavnpp24672atoifp3mo1
[Wed Oct 20 16:48:11 2010] [error] [client 192.168.60.116] PHP 2.
Horde_Notification_Handler->notify($options = array ('listeners' =>
'status')) /home/jan/horde-git/horde/services/portal/index.php:71,
referer:
http://neo.wg.de/headhorde/login.php?Horde=s3k1hnavnpp24672atoifp3mo1
This also breaks complete access to DIMP:
[Wed Oct 20 16:48:31 2010] [error] [client 192.168.60.116] PHP Notice:
Trying to get property of non-object in
/home/jan/horde-git/framework/Notification/lib/Horde/Notification/Handler.php
on line 303, referer: http://neo.wg.de/headhorde/imp/index-dimp.php
[Wed Oct 20 16:48:31 2010] [error] [client 192.168.60.116] PHP Stack
trace:, referer: http://neo.wg.de/headhorde/imp/index-dimp.php
[Wed Oct 20 16:48:31 2010] [error] [client 192.168.60.116] PHP 1.
{main}() /home/jan/horde-git/horde/services/ajax.php:0, referer:
http://neo.wg.de/headhorde/imp/index-dimp.php
[Wed Oct 20 16:48:31 2010] [error] [client 192.168.60.116] PHP 2.
Horde::prepareResponse($data = class stdClass { public $portal = '<div
id="portalchunk"> \\n \\n <div class="headerbox"> \\n <h1
class="header"><a app="imp">Ordner\xc3\xbcbersicht</a></h1> \\n
<!--a75c305b1c0a6022--><table cellspacing="0" width="100%"><tr
style="cursor:pointer" class="text"
onclick="try{DimpBase.go(\\'folder:INBOX\\');}catch(e){window.location=\\'/headhorde/imp/#folder%3AINBOX\\';}return false;"><td><strong><a>Posteingang</a></strong></td><td><strong>11</strong></td></tr><tr style="cursor:pointer" class="text" onclick="try{DimpBase.go(\\'folder:INBOX.horde.apps\\');}catch(e){window.location=...'; public $linkTags = array () }, $notify = TRUE) /home/jan/horde-git/horde/services/ajax.php:73, referer:
http://neo.wg.de/headhorde/imp/index-dimp.php
[Wed Oct 20 16:48:31 2010] [error] [client 192.168.60.116] PHP 3.
Horde_Notification_Handler->notify($options = array ('listeners' =>
'status', 'raw' => TRUE))
/home/jan/horde-git/framework/Core/lib/Horde.php:546, referer:
http://neo.wg.de/headhorde/imp/index-dimp.php