Skip to content

Commit 43824ba

Browse files
author
latham
committed
Validate DNS notify host. Customers were putting email addresses in there. Testing for IP addresses.
1 parent 3cdb9a8 commit 43824ba

23 files changed

+28
-0
lines changed

interface/web/dns/form/dns_soa.tform.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@
175175
'also_notify' => array (
176176
'datatype' => 'VARCHAR',
177177
'formtype' => 'TEXT',
178+
'validators' => array ( 0 => array ( 'type' => 'ISIPV4',
179+
'errmsg'=> 'also_notify_error_regex'
180+
),
181+
),
178182
'default' => '',
179183
'value' => '',
180184
'width' => '30',

interface/web/dns/lib/lang/ar_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $wb['ns_error_regex'] = 'NS has a invalid format.';
2222
$wb['mbox_error_empty'] = 'Email is empty.';
2323
$wb['mbox_error_regex'] = 'Email format invalid.';
2424
$wb['also_notify_txt'] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Update ACL';
2627
?>

interface/web/dns/lib/lang/bg_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $wb['ns_error_regex'] = 'NS has a invalid format.';
2222
$wb['mbox_error_empty'] = 'Email is empty.';
2323
$wb['mbox_error_regex'] = 'Email format invalid.';
2424
$wb['also_notify_txt'] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Update ACL';
2627
?>

interface/web/dns/lib/lang/br_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ $wb['ns_error_regex'] = 'NS tem um formato inválido.';
2222
$wb['mbox_error_empty'] = 'Correio está em branco.';
2323
$wb['mbox_error_regex'] = 'Correio com formato inválido.';
2424
$wb['also_notify_txt'] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Atualizar ACL';
2627
$wb['seconds_txt'] = 'Segundos';
2728
$wb['eg_domain_tld'] = 'e.x. dominio.ext';

interface/web/dns/lib/lang/cz_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ $wb['ns_error_regex'] = 'NS má chybný formát.';
2222
$wb['mbox_error_empty'] = 'Email je prázdný.';
2323
$wb['mbox_error_regex'] = 'Email má chybný formát.';
2424
$wb['also_notify_txt'] = 'Také upozornit';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Aktualizovat ACL';
2627
$wb['seconds_txt'] = 'vteřin';
2728
$wb['eg_domain_tld'] = 'např. domena.cz';

interface/web/dns/lib/lang/de_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $wb['ns_error_regex'] = 'NS hat ein ungültiges Format.';
2222
$wb['mbox_error_empty'] = 'Email ist leer.';
2323
$wb['mbox_error_regex'] = 'Email Format ungültig.';
2424
$wb['also_notify_txt'] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Update ACL';
2627
?>

interface/web/dns/lib/lang/el_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $wb['ns_error_regex'] = 'NS με μη έγκυρη μορφοποίηση.';
2222
$wb['mbox_error_empty'] = 'Το Email δεν έχει οριστεί.';
2323
$wb['mbox_error_regex'] = 'Email με μη έγκυρη μορφοποίηση.';
2424
$wb['also_notify_txt'] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Update ACL';
2627
?>

interface/web/dns/lib/lang/en_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ $wb["ns_error_regex"] = 'NS has a invalid format.';
2222
$wb["mbox_error_empty"] = 'Email is empty.';
2323
$wb["mbox_error_regex"] = 'Email format invalid.';
2424
$wb["also_notify_txt"] = 'Also Notify';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb["update_acl_txt"] = 'Update ACL';
2627
$wb['seconds_txt'] = 'Seconds';
2728
$wb['eg_domain_tld'] = 'e.g. domain.tld';

interface/web/dns/lib/lang/es_dns_soa.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ $wb['ns_error_regex'] = 'Formato de NS no válido.';
2222
$wb['mbox_error_empty'] = 'Correo vacío.';
2323
$wb['mbox_error_regex'] = 'Formato de correo no válido.';
2424
$wb['also_notify_txt'] = 'Notificar también a';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
26+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
27+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2528
$wb['update_acl_txt'] = 'Actualizar ACL';
2629
?>

interface/web/dns/lib/lang/fi_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $wb['ns_error_regex'] = 'Nimipalvelin-kenttä on tyhjä.';
2222
$wb['mbox_error_empty'] = 'Sähköpostiosoite on tyhjä.';
2323
$wb['mbox_error_regex'] = 'Sähköpostiosoite on vääränlainen';
2424
$wb['also_notify_txt'] = 'Läheta ilmoitus';
25+
$wb['also_notify_error_regex'] = 'Please use an IP address.';
2526
$wb['update_acl_txt'] = 'Päivitä ACL';
2627
?>

0 commit comments

Comments
 (0)