[horde] [horde wiki] preauthenticate hook breaks attachment download and other preferences
Rafael Varela Pet
rafael.varela at usc.es
Mon May 2 16:10:44 UTC 2011
Hi,
Disclaimer: Maybe this issue comes a little bit late, specially now that Horde4 is out, but I think that it's worth warning the rest of the users about it.
We have used the second example at http://wiki.horde.org/ImapSelect to write a preauthenticate hook that selects a IMAP server dynamically using the "realmed" username. We are using Horde 3.1.9 / IMP 4.1.6.
That script has some problems. One of them is that it does not initialize all the IMAP server values (it's missing "acl", for example), but the important one is that it breaks attachment downloads (and maybe other things).
When we have this hook enabled, if a user clicks to download an attachment, the browser shows it inline, no matter what kind of file is (it happens with office documents, zip files, etc.).
We suspect that the manipulation of this session variable is the culprit:
$_SESSION['imp']['user'] = $userID;
It seems that is breaking something in the user preferences management (looking through the code, seems that setting this value in the hook prevents other session variables to be properly set)
I have a couple of screenshots that illustrate the problem with the attachment downloads:
http://dl.dropbox.com/u/3983946/Horde/horde-1.png
http://dl.dropbox.com/u/3983946/Horde/horde-2.png
Does anyone have a clue about any possible solution?
I'm aware that there is a more elegant way to do what I want using Horde 4 (http://bugs.horde.org/ticket/4456) but, for now, I need to solve it with horde 3.
Thanks in advance and best regards,
--
Rafael Varela Pet <rafael.varela at usc.es>
More information about the horde
mailing list