From aec2869e49ae178a44917f6829960a4da76b0121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Wei=C3=9Fl?= Date: Sun, 2 Dec 2012 18:50:11 +0100 Subject: [PATCH 1/2] Add host config option to http_authentication plugin. This is useful if the users are free to choose arbitrary mail hosts (or from a list), but have one host they usually want to log into. Otherwise the username/password must always be typed in twice. --- plugins/http_authentication/config.inc.php.dist | 9 +++++++++ plugins/http_authentication/http_authentication.php | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 plugins/http_authentication/config.inc.php.dist diff --git a/plugins/http_authentication/config.inc.php.dist b/plugins/http_authentication/config.inc.php.dist new file mode 100644 index 000000000..0d798a586 --- /dev/null +++ b/plugins/http_authentication/config.inc.php.dist @@ -0,0 +1,9 @@ +load_config(); + + $host = rcmail::get_instance()->config->get('http_authentication_host'); + if (is_string($host) && trim($host) !== '') + $args['host'] = rcube_idn_to_ascii(rcube_parse_host($host)); + // Allow entering other user data in login form, // e.g. after log out (#1487953) if (!empty($args['user'])) { From c0208002a804aa36cf6891e9875e2f8adc0deb2d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 15 Dec 2012 18:32:42 +0100 Subject: [PATCH 2/2] Fix escaping of add-contact arguments - fixes JS error in IE --- program/steps/mail/func.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index bd381d5c0..88391b102 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1528,7 +1528,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, if ($addicon && $_SESSION['writeable_abook']) { $address .= html::a(array( 'href' => "#add", - 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, $string), + 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, JQ($string)), 'title' => rcube_label('addtoaddressbook'), 'class' => 'rcmaddcontact', ),