From f5d61d845f8cfce4c7b559a900df846947e45b00 Mon Sep 17 00:00:00 2001 From: thomascube Date: Wed, 21 Oct 2009 08:47:40 +0000 Subject: Revert r3038 and allow to specify the port as value of force_https --- plugins/force_https/force_https.php | 38 ------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 plugins/force_https/force_https.php (limited to 'plugins') diff --git a/plugins/force_https/force_https.php b/plugins/force_https/force_https.php deleted file mode 100644 index 67552570e..000000000 --- a/plugins/force_https/force_https.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class force_https extends rcube_plugin -{ - function init() - { - $this->add_hook('startup', array($this, 'redirect')); - } - - function redirect($args) - { - $config = rcmail::get_instance()->config; - - $port = (int) $config->get('force_https_port', 443); - - // check if https is required (for login) and redirect if necessary - if (empty($_SESSION['user_id']) && !$config->get('use_https') - && (!isset($_SERVER['HTTPS']) || $_SERVER['SERVER_PORT'] != $port)) - { - header('Location: https://' . $_SERVER['HTTP_HOST'] . ($port != 443 ? ":$port" : '') . $_SERVER['REQUEST_URI']); - exit; - } - - return $args; - } -} - -?> -- cgit v1.2.3