Changeset e48a10a in github


Ignore:
Timestamp:
Jul 2, 2009 2:38:26 AM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
bd9bfcf
Parents:
e40091b
Message:

Add option to enforce https connections

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rac62299 re48a10a  
    22=========================== 
    33 
     4- Added config option to enforce HTTPS connections 
    45- Fix non-unicode characters caching in unicode database (#1484608) 
    56- Performance improvements of messages caching 
  • config/main.inc.php.dist

    r119cd17 re48a10a  
    5050// possible units: s, m, h, d, w 
    5151$rcmail_config['message_cache_lifetime'] = '10d'; 
     52 
     53// enforce connections over https 
     54// with this option enabled, all non-secure connections will be redirected 
     55$rcmail_config['force_https'] = FALSE; 
    5256 
    5357// automatically create a new RoundCube user when log-in the first time. 
  • index.php

    r3a2b270 re48a10a  
    33 +-------------------------------------------------------------------------+ 
    44 | RoundCube Webmail IMAP Client                                           | 
    5  | Version 0.3-20090419                                                    | 
     5 | Version 0.3-20090702                                                    | 
    66 |                                                                         | 
    77 | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                   | 
     
    6464} 
    6565 
     66// check if https is required (for login) and redirect if necessary 
     67if ($RCMAIL->config->get('force_https', false) && empty($_SESSION['user_id']) && !(isset($_SERVER['HTTPS']) || $_SERVER['SERVER_PORT'] == 443)) { 
     68  header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     69  exit; 
     70} 
    6671 
    6772// trigger startup plugin hook 
Note: See TracChangeset for help on using the changeset viewer.