fix idna convert for >=php-5.6 users when customers want to add a subdomain with an idna-encoded domain

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-08-31 15:12:01 +02:00
parent 8f488d7701
commit d7388f20e6

View File

@@ -265,7 +265,7 @@ if ($page == 'overview') {
}
$subdomain = $idna_convert->encode(preg_replace(array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
$domain = $idna_convert->encode($_POST['domain']);
$domain = $_POST['domain'];
$domain_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `domain` = :domain
AND `customerid` = :customerid