From eb70e619c9dbffc6d837fc80f169e930ead57464 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 18 May 2016 10:28:13 +0200 Subject: [PATCH] also check for punycode when customer adds a subdomain Signed-off-by: Michael Kaufmann (d00p) --- customer_domains.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/customer_domains.php b/customer_domains.php index d7bdbc9b..1464d512 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -247,6 +247,11 @@ if ($page == 'overview') { } elseif ($action == 'add') { if ($userinfo['subdomains_used'] < $userinfo['subdomains'] || $userinfo['subdomains'] == '-1') { if (isset($_POST['send']) && $_POST['send'] == 'send') { + + if (strpos($_POST['subdomain'], '--') !== false) { + standard_error('domain_nopunycode'); + } + $subdomain = $idna_convert->encode(preg_replace(array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong'))); $domain = $idna_convert->encode($_POST['domain']); $domain_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "`