Skip to content

Commit 2cbff3b

Browse files
committed
Fixed: FS#1007 - add a stricter check for getmail domains names.
1 parent b9c1de7 commit 2cbff3b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

interface/web/mail/form/mail_get.tform.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
'formtype' => 'TEXT',
8181
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
8282
'errmsg'=> 'source_server_error_isempty'),
83+
1 => array ( 'type' => 'REGEX',
84+
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
85+
'errmsg'=> 'source_server_error_regex'),
8386
),
8487
'default' => '',
8588
'value' => '',

interface/web/mail/lib/lang/en_mail_get.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ $wb["source_server_error_isempty"] = 'Server is empty.';
1212
$wb["source_username_error_isempty"] = 'Username is empty.';
1313
$wb["source_password_error_isempty"] = 'Password is empty.';
1414
$wb["destination_error_isemail"] = 'No destination selected.';
15+
$wb["source_server_error_regex"] = 'Pop3/Imap Server is not a valid domain name.';
1516
?>

0 commit comments

Comments
 (0)