From efc353256df5f0c76836508f85a6f8fa59217fc1 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 31 May 2010 08:28:12 +0000 Subject: [PATCH] - only check for colon if document-root is not a domain-name (redirect), fixes #253 --- admin_domains.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/admin_domains.php b/admin_domains.php index cd9deb08..d407c56c 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -369,7 +369,14 @@ if($page == 'domains' if(!preg_match('/^https?\:\/\//', $documentroot)) { - $documentroot = makeCorrectDir($documentroot); + if(strstr($documentroot, ":") !== FALSE) + { + standard_error('pathmaynotcontaincolon'); + } + else + { + $documentroot = makeCorrectDir($documentroot); + } } $domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'"); @@ -451,10 +458,6 @@ if($page == 'domains' { standard_error(array('stringisempty', 'mydocumentroot')); } - elseif(strstr($documentroot, ":") !== FALSE) - { - standard_error('pathmaynotcontaincolon'); - } elseif($customerid == 0) { standard_error('adduserfirst'); @@ -749,8 +752,9 @@ if($page == 'domains' $documentroot = $customer['documentroot']; } - if(strstr($documentroot, ":") !== FALSE) - { + if(!preg_match('/^https?\:\/\//', $documentroot) + && strstr($documentroot, ":") !== FALSE + ) { standard_error('pathmaynotcontaincolon'); } }