From: Michael Tremer Date: Mon, 11 Aug 2025 11:04:06 +0000 (+0100) Subject: ids.cgi: Fix regular expression to check for valid email addresses X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09e6c2141c8112af2e7aa49f953e4654692d5519;p=ipfire-2.x.git ids.cgi: Fix regular expression to check for valid email addresses Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 8b14baad5..362cbec87 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -2127,8 +2127,9 @@ sub _validate_mail_address($) { # Loop through the array of mail addresses. foreach my $addr (@temp) { - # Return 1 if the processed mail address is invalid. - return 1 unless($addr =~ '^([a-zA-Z][\w\_\.]{6,15})\@([a-zA-Z0-9.-]+)\.([a-zA-Z]{2,4})$'); + # If the address contains a '@' with at least one character before and after, + # we consider it valid. + return 1 unless ($address =~ m/.@./); } # Return nothing if the address is valid.