Changeset 311

Show
Ignore:
Timestamp:
01/10/05 15:15:05 (8 years ago)
Author:
benoitg
Message:

2004-01-10 Benoit Gr�goire <bock@…>

  • include/common.php: Fix SSL security warnings. If SSL is enabled and the page was actually served over SSL, all media in the file will be served over SSL. Add a new define (BASE_NON_SSL_PATH) to allow us to make links that break out of SSL mode. From now on, use the self adapting BASE_URL_PATH in most circumstance, BASE_SSL_PATH to enter SSL mode, and BASE_URL_PATH to break out of it.
Location:
trunk/wifidog-auth
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r310 r311  
    11# $Header$ 
     22004-01-10 Benoit Gr�goire  <bock@step.polymtl.ca> 
     3        * include/common.php: Fix SSL security warnings.  If SSL is enabled and the page was actually served over SSL, all media in the file will be served over SSL. Add a new define (BASE_NON_SSL_PATH) to allow us to make links that break out of SSL mode.  From now on, use the self adapting BASE_URL_PATH in most circumstance, BASE_SSL_PATH to enter SSL mode, and BASE_URL_PATH to break out of it. 
    242004-01-10 Benoit Gr�goire  <bock@step.polymtl.ca> 
    35        * admin/user_stats.php: Add three top tens to the statistics:  Top ten apetite for bandwidth, top ten travelers, most addicted users. 
  • trunk/wifidog-auth/wifidog/include/common.php

    r227 r311  
    6363 
    6464/* This section deals with PATHs */ 
    65 define('BASE_URL_PATH', 'http://' . $_SERVER['HTTP_HOST'] . SYSTEM_PATH); 
     65define('BASE_NON_SSL_PATH', 'http://' . $_SERVER['HTTP_HOST'] . SYSTEM_PATH); 
     66 
    6667if(SSL_AVAILABLE) 
    6768  { 
     
    7071else 
    7172  { 
    72     define('BASE_SSL_PATH',BASE_URL_PATH); 
     73    define('BASE_SSL_PATH', BASE_NON_SSL_PATH); 
     74  } 
     75   
     76  /* If we actually ARE in SSL mode, make all URLS http:// to avoid security warnings. */ 
     77if(isset($_SERVER['HTTPS'])) 
     78  { 
     79  define('BASE_URL_PATH', BASE_SSL_PATH);  
     80  } 
     81  else 
     82  { 
     83  define('BASE_URL_PATH', BASE_NON_SSL_PATH); 
    7384  } 
    7485