[horde] Horde4/BCBreaking

Michael M Slusarz slusarz at horde.org
Wed Nov 2 03:10:27 UTC 2011


Quoting Christopher Neuhaus <cne at ruhrverband.de>:

> Am 26.10.2011 20:22, schrieb Michael M Slusarz:
>> Quoting Christopher Neuhaus <cne at ruhrverband.de>:
>>
>>> In our multi IMAP-/one Horde-Server environment, we use a
>>> preauthentication hook to autoselect the IMAP-Server for the user. Here
>>> we extract the information of one of many IMAP-servers where the user
>>> should authenticate. (just like http://wiki.horde.org/ImapSelect)
>>>
>>> After the H4 authentication cleaning process ..
>>>
>>>     http://wiki.horde.org/Horde4/BCBreaking: "Remove confusing mess of
>>>     hooks and other ways of muddling logins (especially with IMP), and
>>>     replace them _all_ with the preauthenticate and postauthenticate
>>>     hooks + appropriate examples for things like vhosting. *(DONE)"*
>>>     **
>>>
>>>  this solution doesn`t  work any more cause there are several changes,
>>> that make this method impossible.
>>
>> How is it impossible?  Just disable the server selection list on the
>> login page and set the desired server in the preauthenticate() hook.
>> See imp/config/hooks.php.dist
>>
>> michael
>>
>> ___________________________________
>> Michael Slusarz [slusarz at horde.org]
>>
>
> Hi Michael,
>
> while we where searching, why our H3-hook doesn`t work for H4, we found
> f.e. that in imp/lib/Auth.php $_SERVER['HTTP_HOST'] is take for
> identifying the users authentication host. This has to be changed for
> each user who authenticates against a different server.

No - this is only used if 'preferred' is set in backends.php.  Don't  
set preferred.

> I think we are not alone with our problem. Perhaps you have an idea how
> our solution could be realised in a imp preauthenticate() hook?

public function preauthenticate($userId, $credentials)
{
     // Do magic here to determine the preferred server.  Store the  
preferred server key (from backends.php)
     // in $key

     $credentials['server'] = $key;

     return $credentials;
}

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list