ftimme
2013-10-09 f68b4ea2e152bed3f86634da65bce306658be594
- Fixed FS#3158 - IDN domain filter not working in dns manager.
1 files modified
19 ■■■■■ changed files
interface/web/dns/dns_wizard.php 19 ●●●●● patch | view | raw | blame | history
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 />';