- only check for colon if document-root is not a domain-name (redirect), fixes #253
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user