#174 abook_group 0.51 and SM 1.4.9a - session problem

closed-fixed
nobody
None
5
2007-01-22
2006-12-29
No

I've found a small problem with the abook_group plugin (abook_group-0.51-1.4.2.tar.gz from the plugin download page) and SquirrelMail 1.4.9a.

The function agroup_check_backends() in plugins/abook_group/abook_group_functions.php calls sqsession_register($ret,'agroup_mixed'). This appears to be there so that the plugin can quickly determine whether to use mixed backends, and most of the time, this causes no problems.

Sadly, when replying to a message (src/compose.php), this function is called when the session is not open, after being closed by session_write_close() on line 871 of src/compose.php, and also after some html output has taken place. Thus, the the implicit session_start fired off by the call to session_register fails because the session cookie header can't be sent, causing a couple of php warning messages.

My workaround is to comment out the sqsession_register call in agroup_check_backends() at the expense of a slight performance hit.

Someone who understands either the abook_group plugin, or the positioning of the call to session_write_close() on line 871 of src/compose.php should be able to come up with a better fix.

This problem occurs on a vanilla SquirrelMail installation with only the abook_group plugin installed.

If you need any further information or any testing doing, just ask.

Thanks

Discussion

  • Phil Driscoll

    Phil Driscoll - 2007-01-22

    Logged In: YES
    user_id=11015
    Originator: YES

    Thanks for the prompt fix Tomas.

    I've put the new versions of abook_group_functions.php and setup.php into my Squirrelmail setup and the compose.php now works without problems.

    Good work!

     
  • Phil Driscoll

    Phil Driscoll - 2007-01-22
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks