6.0.0-git
2019-03-19

[#9117] cookie attempting to be set after headers sent when using SQL auth
Summary cookie attempting to be set after headers sent when using SQL auth
Queue Horde Base
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at) , jan (at) horde (dot) org, slusarz (at) horde (dot) org
Requester mrubinsk (at) horde (dot) org
Created 2010-06-29 (3185 days ago)
Due
Updated 2010-07-15 (3169 days ago)
Assigned
Resolved 2010-07-15 (3169 days ago)
Milestone
Patch No

History
2010-07-15 22:33:52 Michael Slusarz Comment #5
State ⇒ Resolved
Reply to this comment
Should be fixed.
2010-07-05 15:21:08 Jan Schneider Comment #3 Reply to this comment
The reason is, it's exactly the opposite. The IMP sidebar block is 
calling the IMP auth code that sets this cookie. But the sidebar is 
loaded after the page headers and menu have already been sent.
2010-07-01 08:28:05 Jan Schneider Comment #2
Assigned to Michael Slusarz
Reply to this comment
This is probably happening because the applications are initialized in 
the portal view when the application block is rendered. With the 
frameset the sidebar was probably loading earlier, where this isn't 
the case. I wonder why we never had a race condition before though.
2010-06-29 22:43:21 Michael Rubinsky Comment #1
Type ⇒ Bug
State ⇒ Assigned
Priority ⇒ 1. Low
Summary ⇒ cookie attempting to be set after headers sent when using SQL auth
Queue ⇒ Horde Base
Assigned to Jan Schneider
Assigned to Horde DevelopersHorde Developers
Milestone ⇒
Patch ⇒ No
Reply to this comment
Probably a side effect of moving the sidebar out of the frameset, but 
when using SQL authentication, after logging in, I get the following 
error due to the fact that IMP is trying to set the default_imp_view 
cookie after headers have already been sent:

Warning: Cannot modify header information - headers already sent by 
(output started at 
/usr/local/horde/horde/horde/templates/common-header.inc:8) in 
/usr/local/horde/horde/imp/lib/Auth.php on line 481
Call Stack
#        Time        Memory        Function        Location
1        0.0003        622192        {main}( )        ../index.php:0
2        0.5251        12633048        require( 
'/usr/local/horde/horde/horde/templates/menu/menu.inc' )        ../index.php:65
3        0.5910        12986320        require( 
'/usr/local/horde/horde/horde/services/portal/sidebar.php' 
)        ../menu.inc:13
4        0.5914        12986320        sidebar( )        ../sidebar.php:284
5        0.6818        16966424        Horde_Block_Collection::getBlock( $app = 'imp', 
$name = 'tree_folders', $params = ???, $row = ???, $col = ??? 
)        ../sidebar.php:221
6        0.6827        17025376        Horde_Registry->pushApp( $app = 'imp', $options = 
??? )        ../Collection.php:162
7        0.6830        17026504        Horde_Registry->hasPermission( $app = 'imp', $perms 
= 4 )        ../Registry.php:1093
8        0.6830        17026816        Horde_Registry->isAuthenticated( $options = array 
('app' => 'imp') )        ../Registry.php:1222
9        0.6847        17028632        Horde_Core_Auth_Application->transparent( 
)        ../Registry.php:1678
10        0.8458        21144648        Horde_Core_Auth_Application->_setAuth( 
)        ../Application.php:307
11        0.8483        21146056        Horde_Registry->callAppMethod( $app = 'imp', $call 
= 'authAuthenticateCallback', $options = array ('noperms' => TRUE) 
)        ../Application.php:586
12        0.8531        21163912        call_user_func_array ( array (0 => class 
IMP_Application { public $ajaxView = TRUE; public $mobileView = TRUE; 
public $version = 'H4 (5.0-git)'; public $disabled = array (0 => 
'authAddUser', 1 => 'authRemoveUser', 2 => 'authUserList'); public 
$initParams = array (); protected $_initDone = TRUE }, 1 => 
'authAuthenticateCallback'), array () )        ../Registry.php:884
13        0.8531        21163944        IMP_Application->authAuthenticateCallback( 
)        ../Registry.php:0
14        0.8532        21163944        IMP_Auth::authenticateCallback( )        ../Application.php:336
15        0.8633        21419216        setcookie ( 'default_imp_view', 'imp', 1280443135, 
'/horde', '' )        ../Auth.php:481

Saved Queries