Changeset 5818e44 in github


Ignore:
Timestamp:
Oct 27, 2009 5:43:39 AM (4 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
2cb5b5a
Parents:
d22f4e6
Message:
  • Fix $_SERVERHTTPS? check for SSL forcing on IIS (#1486243) + fix port check
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r700ef1f r5818e44  
    22=========================== 
    33 
     4- Fix $_SERVER['HTTPS'] check for SSL forcing on IIS (#1486243) 
    45- Avoid unnecessary page loads for selected tab (#1486032) 
    56- Fix quota indicator issues by content generation on client-size (#1486197, #1486220) 
  • index.php

    rf5d61d84 r5818e44  
    6767if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) { 
    6868  $https_port = is_bool($force_https) ? 443 : $force_https; 
    69   if (!(isset($_SERVER['HTTPS']) || $_SERVER['SERVER_PORT'] == $use_https || $RCMAIL->config->get('use_https'))) { 
     69  if (!rcube_https_check($https_port)) { 
    7070    header('Location: https://' . $_SERVER['HTTP_HOST'] . ($https_port != 443 ? ':' . $https_port : '') . $_SERVER['REQUEST_URI']); 
    7171    exit; 
  • program/include/main.inc

    re4acbbd r5818e44  
    14021402 
    14031403/** 
     1404 * Check if working in SSL mode 
     1405 * 
     1406 * @param integer HTTPS port number 
     1407 * @param boolean Enables 'use_https' option checking 
     1408 */ 
     1409function rcube_https_check($port=null, $use_https=true) 
     1410{ 
     1411  global $RCMAIL; 
     1412   
     1413  if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') 
     1414    return true; 
     1415  if ($port && $_SERVER['SERVER_PORT'] == $port) 
     1416    return true; 
     1417  if ($use_https && $RCMAIL->config->get('use_https')) 
     1418    return true; 
     1419 
     1420  return false; 
     1421} 
     1422 
     1423 
     1424/** 
    14041425 * E-mail address validation 
    14051426 */ 
  • program/include/rcube_shared.inc

    rb6c512a r5818e44  
    4242   
    4343  // We need to set the following headers to make downloads work using IE in HTTPS mode. 
    44   if (isset($_SERVER['HTTPS']) || rcmail::get_instance()->config->get('use_https')) { 
     44  if (rcube_https_check()) { 
    4545    header('Pragma: '); 
    4646    header('Cache-Control: '); 
Note: See TracChangeset for help on using the changeset viewer.