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/gitweb.cgi?a=commitdiff_plain;h=9008d0e4fa2666cf76910ffcabdcfc3e151d1631;p=people%2Fstevee%2Fipfire-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.