From 2cbff3b553d2e65ef67797b85176e3d87c8a97ce Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 14 Jan 2010 15:02:28 +0000 Subject: [PATCH] Fixed: FS#1007 - add a stricter check for getmail domains names. --- interface/web/mail/form/mail_get.tform.php | 3 +++ interface/web/mail/lib/lang/en_mail_get.lng | 1 + 2 files changed, 4 insertions(+) diff --git a/interface/web/mail/form/mail_get.tform.php b/interface/web/mail/form/mail_get.tform.php index 402c5b9035..d25167a367 100644 --- a/interface/web/mail/form/mail_get.tform.php +++ b/interface/web/mail/form/mail_get.tform.php @@ -80,6 +80,9 @@ $form["tabs"]['mailget'] = array ( 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'source_server_error_isempty'), + 1 => array ( 'type' => 'REGEX', + 'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/', + 'errmsg'=> 'source_server_error_regex'), ), 'default' => '', 'value' => '', diff --git a/interface/web/mail/lib/lang/en_mail_get.lng b/interface/web/mail/lib/lang/en_mail_get.lng index 74d2dd81a9..e2180e5eb2 100644 --- a/interface/web/mail/lib/lang/en_mail_get.lng +++ b/interface/web/mail/lib/lang/en_mail_get.lng @@ -12,4 +12,5 @@ $wb["source_server_error_isempty"] = 'Server is empty.'; $wb["source_username_error_isempty"] = 'Username is empty.'; $wb["source_password_error_isempty"] = 'Password is empty.'; $wb["destination_error_isemail"] = 'No destination selected.'; +$wb["source_server_error_regex"] = 'Pop3/Imap Server is not a valid domain name.'; ?> \ No newline at end of file -- GitLab