- only check for colon if document-root is not a domain-name (redirect), fixes #253

This commit is contained in:
Michael Kaufmann (d00p)
2010-05-31 08:28:12 +00:00
parent f4026c1df5
commit efc353256d

View File

@@ -368,9 +368,16 @@ if($page == 'domains'
}
if(!preg_match('/^https?\:\/\//', $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)) . "'");
$aliasdomain_check = array(
@@ -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');
}
}