From f68b4ea2e152bed3f86634da65bce306658be594 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 09 Oct 2013 19:14:56 -0400
Subject: [PATCH] - Fixed FS#3158 - IDN domain filter not working in dns manager.

---
 interface/web/dns/dns_wizard.php |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index 4a22d03..ad26c43 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -132,6 +132,25 @@
 	
 	$error = '';
 	
+	// apply filters
+	if(isset($_POST['domain']) && $_POST['domain'] != ''){
+		$_POST['domain'] = $app->functions->idn_encode($_POST['domain']);
+		$_POST['domain'] = strtolower($_POST['domain']);
+	}
+	if(isset($_POST['ns1']) && $_POST['ns1'] != ''){
+		$_POST['ns1'] = $app->functions->idn_encode($_POST['ns1']);
+		$_POST['ns1'] = strtolower($_POST['ns1']);
+	}
+	if(isset($_POST['ns2']) && $_POST['ns2'] != ''){
+		$_POST['ns2'] = $app->functions->idn_encode($_POST['ns2']);
+		$_POST['ns2'] = strtolower($_POST['ns2']);
+	}
+	if(isset($_POST['email']) && $_POST['email'] != ''){
+		$_POST['email'] = $app->functions->idn_encode($_POST['email']);
+		$_POST['email'] = strtolower($_POST['email']);
+	}
+	
+	
 	if(isset($_POST['domain']) && $_POST['domain'] == '') $error .= $app->lng('error_domain_empty').'<br />';
 	elseif(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,30}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
 

--
Gitblit v1.9.1