Commit ce88fc88 authored by Antoine Tenart's avatar Antoine Tenart

pwain

parent 366a80ff
...@@ -85,7 +85,7 @@ class webdavserverae extends HTTP_WebDAV_Server ...@@ -85,7 +85,7 @@ class webdavserverae extends HTTP_WebDAV_Server
*/ */
function checkAuth($type, $username, $password) function checkAuth($type, $username, $password)
{ {
if ( $_SERVER["REMOTE_ADDR"] != "127.0.1.1" ) // on n'est pas en HTTPS : Pas d'auth, accès anonyme if (isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on") // on n'est pas en HTTPS : Pas d'auth, accès anonyme
return true; return true;
if ( $type == "digest" ) // Digest not supported if ( $type == "digest" ) // Digest not supported
...@@ -94,7 +94,7 @@ class webdavserverae extends HTTP_WebDAV_Server ...@@ -94,7 +94,7 @@ class webdavserverae extends HTTP_WebDAV_Server
if ( $username == "anonymous" ) if ( $username == "anonymous" )
return true; return true;
if ( preg_match('/^\/var\/www\/ae\/www\/(taiste|taiste21)\//', $_SERVER['SCRIPT_FILENAME']) ) if ( preg_match('/^\/var\/www\/taiste\//', $_SERVER['SCRIPT_FILENAME']) )
{ {
$this->user->load_by_alias($username); $this->user->load_by_alias($username);
return true; return true;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
if ( !isset($GLOBALS['nosession']) ) if ( !isset($GLOBALS['nosession']) )
session_start(); session_start();
if ( $_SERVER["REMOTE_ADDR"] == "127.0.1.1" ) if ( isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" )
$GLOBALS["is_using_ssl"] = true; $GLOBALS["is_using_ssl"] = true;
require_once($topdir . "include/interface.inc.php"); require_once($topdir . "include/interface.inc.php");
......
...@@ -4,7 +4,7 @@ $topdir = "./"; ...@@ -4,7 +4,7 @@ $topdir = "./";
require_once($topdir. "include/mysql.inc.php"); require_once($topdir. "include/mysql.inc.php");
require_once($topdir. "include/mysqlae.inc.php"); require_once($topdir. "include/mysqlae.inc.php");
if ( $_SERVER["REMOTE_ADDR"] != "127.0.1.1" ) if ( isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on" )
{ {
echo "ERROR HTTPS REQUIRED"; echo "ERROR HTTPS REQUIRED";
exit(); exit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment