do not idna-encode already encoded domain when addin a new email address (only an issue when using >=php-5.6

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-08-06 07:41:06 +02:00
parent cd806b19f7
commit d994379130

View File

@@ -205,7 +205,8 @@ if ($page == 'overview') {
if ($userinfo['emails_used'] < $userinfo['emails'] || $userinfo['emails'] == '-1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$email_part = $_POST['email_part'];
$domain = $idna_convert->encode(validate($_POST['domain'], 'domain'));
// domain does not need idna encoding as the value of the select-box is already Punycode
$domain = validate($_POST['domain'], 'domain');
$stmt = Database::prepare("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `domain`= :domain
AND `customerid`= :customerid