alecpl
2009-11-04 3ea30ef7ebb7aa6180a47db29575055dd97cff62
- fix HTTPS checking (#1486273)


3 files modified
8 ■■■■ changed files
program/include/iniset.php 4 ●●●● patch | view | raw | blame | history
program/include/main.inc 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php 2 ●●● patch | view | raw | blame | history
program/include/iniset.php
@@ -51,8 +51,8 @@
}
ini_set('error_reporting', E_ALL&~E_NOTICE);
if  (isset($_SERVER['HTTPS'])) {
   ini_set('session.cookie_secure', ($_SERVER['HTTPS'] && ($_SERVER['HTTPS'] != 'off'))?1:0);
if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') {
   ini_set('session.cookie_secure', 1);
} else {
   ini_set('session.cookie_secure', 0);
}
program/include/main.inc
@@ -1410,7 +1410,7 @@
{
  global $RCMAIL;
  
  if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
  if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off')
    return true;
  if ($port && $_SERVER['SERVER_PORT'] == $port)
    return true;
program/include/rcmail.php
@@ -1063,7 +1063,7 @@
  {
    $cookie = session_get_cookie_params();
    setcookie($name, $value, $exp, $cookie['path'], $cookie['domain'],
      ($_SERVER['HTTPS'] && ($_SERVER['HTTPS'] != 'off')));
      rcube_https_check());
  }
}