[RCU] Invalid host with roundcube 0.2-alpha

Vincent Bernat bernat at luffy.cx
Sun Jun 22 13:58:08 CEST 2008


OoO Peu  avant le début de  l'après-midi du dimanche 22  juin 2008, vers
13:28, je disais:

> Hi!
> With roundcube 0.2-alpha,  I get "Invalid host" when  trying to login. I
> think that  the culprit is autoselect_host function.  If my default_host
> is empty, autoselect_host uses default_host:

>     $default_host = $this->config->get('default_host');
>     $host = !empty($default_host) ? get_input_value('_host', RCUBE_INPUT_POST) : $default_host;

> I think that it should be :

>     $default_host = $this->config->get('default_host');
>     $host = empty($default_host) ? get_input_value('_host', RCUBE_INPUT_POST) : $default_host;

> This works  then if default_host  is empty. This  also works if  it only
> contains one host. However, it does not work if I have an array. I don't
> really understand  why the rest of  the code tries to  match user domain
> since default_host is a non-associative array.

> Any hint?

Here is a proposed patch:




 --- 8< --- detachments --- 8< ---
 The following attachments have been detached and are available for viewing.
  http://detached.gigo.com/rc/yr/nC15dQe7/fix_login.patch
 Only click these links if you trust the sender, as well as this message.
 --- 8< --- detachments --- 8< ---

-------------- next part --------------
-- 
# Okay, what on Earth is this one supposed to be used for?
        2.4.0 linux/drivers/char/cp437.uni
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/


More information about the users mailing list