Changeset 1025


Ignore:
Timestamp:
04/26/06 12:16:16 (7 years ago)
Author:
benjamin
Message:

force https parameter, Closes #71

Location:
trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bureau/class/config.php

    r868 r1025  
    3838*/ 
    3939 
    40 /* 
     40/* // Uncomment the following lines and put your IP between the "" to put the dekstop in maintenance mode :  
    4141if (getenv("REMOTE_ADDR")!="81.56.98.108") { 
    4242  echo "Le bureau AlternC est en vacances jusqu'a minuit pour maintenance.<br> 
     
    4545} 
    4646*/ 
     47 
     48 
    4749 
    4850// 1. Get a semaphore id for the alternc magic number (18577) 
     
    7779require_once($root."class/variables.php"); 
    7880 
     81if (!$_SERVER["HTTPS"]) { 
     82  $conf=variable_init(); 
     83  if ($conf["force_https"]) { 
     84    header("Location: https://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]); 
     85  } 
     86} 
    7987 
    8088// Classe héritée de la classe db de la phplib. 
  • trunk/bureau/class/variables.php

    r607 r1025  
    4141 * file. 
    4242 */ 
    43 function variable_init($conf = array()) { 
     43function variable_init() { 
    4444  global $db; 
    4545  $result = $db->query('SELECT * FROM `variable`'); 
  • trunk/install/upgrades/0.9.5.sql

    r1004 r1025  
    77ALTER IGNORE TABLE ftpusers ADD COLUMN encrypted_password VARCHAR(32) default NULL AFTER password; 
    88UPDATE ftpusers SET encrypted_password=ENCRYPT(password) WHERE password!=''; 
     9 
     10-- Force le bureau https si voulu :  
     11INSERT INTO variable SET name='force_https', value='0', comment='Shall we force the users to access the managment desktop through HTTPS only ? If this value is true, HTTPS access will be forced. '; 
Note: See TracChangeset for help on using the changeset viewer.