monitoring/NPalert/Acknowledgement.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a1416bfc15c1165c3f8a072402647aa102be8bd8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 11 16:08:32 2011 +0100
493028 - simplified email check regexp
original one tried to be so smart that didn't even allow root@localhost :-/
diff --git a/monitoring/NPalert/Acknowledgement.pm
b/monitoring/NPalert/Acknowledgement.pm
index 41202d3..bbcb09e 100644
--- a/monitoring/NPalert/Acknowledgement.pm
+++ b/monitoring/NPalert/Acknowledgement.pm
@@ -439,7 +439,7 @@ sub not_valid_redirect {
return "Invalid duration" unless $self->duration =~ /^\d+[mhd]$/;
if ($self->redirect_type =~ /(metoo|redir)/) {
- return "Invalid email destination" unless $self->destination =~
/^([a-zA-Z0-9_\-\.]+)(a)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
#email address validation from
http://www.regexlib.com/REDetails.aspx?regexp_id=26
+ return "Invalid email destination" unless $self->destination =~
/^([a-zA-Z0-9_\-\.\+]+)(a)(\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.\]|[a-zA-Z0-9\-\.]+)$/;
}
return 0