summaryrefslogtreecommitdiff
path: root/plugins/http_authentication/http_authentication.php
diff options
context:
space:
mode:
authorAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
committerAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
commit92cd7f34b07e86062f2c024039e3309768b48ce6 (patch)
tree63b9f39280ebcab80742d9f2b4db6a139c1791e1 /plugins/http_authentication/http_authentication.php
parent029d18f13bcf01aa2f1f08dbdfc6400c081bf7cb (diff)
parent443b92a7ee19e321b350750240e0fc54ec5be357 (diff)
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Diffstat (limited to 'plugins/http_authentication/http_authentication.php')
-rw-r--r--plugins/http_authentication/http_authentication.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php
index a14b5cbcc..57227cb03 100644
--- a/plugins/http_authentication/http_authentication.php
+++ b/plugins/http_authentication/http_authentication.php
@@ -11,6 +11,8 @@
*
* See logout.html (in this directory) for an example how HTTP auth can be cleared.
*
+ * For other configuration options, see config.inc.php.dist!
+ *
* @version @package_version@
* @license GNU GPLv3+
* @author Thomas Bruederli
@@ -36,7 +38,7 @@ class http_authentication extends rcube_plugin
$args['action'] = 'login';
}
// Set user password in session (see shutdown() method for more info)
- else if (!empty($_SESSION['user_id']) && empty($_SESION['password'])) {
+ else if (!empty($_SESSION['user_id']) && empty($_SESSION['password'])) {
$_SESSION['password'] = $rcmail->encrypt($_SERVER['PHP_AUTH_PW']);
}
}
@@ -46,6 +48,13 @@ class http_authentication extends rcube_plugin
function authenticate($args)
{
+ // Load plugin's config file
+ $this->load_config();
+
+ $host = rcmail::get_instance()->config->get('http_authentication_host');
+ if (is_string($host) && trim($host) !== '')
+ $args['host'] = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
+
// Allow entering other user data in login form,
// e.g. after log out (#1487953)
if (!empty($args['user'])) {