From dae233dd05fd93fe4cb251f9dc6e875f63bf036f Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sun, 4 Jun 2017 09:17:31 +0200 Subject: [PATCH] allow adding domains with multiple dashes, that are NOT punycode (xn--) Signed-off-by: Michael Kaufmann (d00p) --- admin_domains.php | 2 +- customer_domains.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin_domains.php b/admin_domains.php index f2a877aa..5b2b31a5 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -306,7 +306,7 @@ if ($page == 'domains' || $page == 'overview') { standard_error('admin_domain_emailsystemhostname'); } - if (strpos($_POST['domain'], '--') !== false) { + if (substr($_POST['domain'], 0, 4) == 'xn--') { standard_error('domain_nopunycode'); } diff --git a/customer_domains.php b/customer_domains.php index 849eb69b..f492ee8a 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -260,7 +260,7 @@ if ($page == 'overview') { if ($userinfo['subdomains_used'] < $userinfo['subdomains'] || $userinfo['subdomains'] == '-1') { if (isset($_POST['send']) && $_POST['send'] == 'send') { - if (strpos($_POST['subdomain'], '--') !== false) { + if (substr($_POST['subdomain'], 0, 4) == 'xn--') { standard_error('domain_nopunycode'); }