Reject blatantly invalid email addresses
authorJacob Bachmeyer <jcb@gnu.org>
Fri, 28 Oct 2022 21:48:16 +0000 (16:48 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Fri, 28 Oct 2022 21:48:16 +0000 (16:48 -0500)
This was added after discovering that, while the maintainers file and
regular email lists were screened for validity, the addresses reported
by GPG were not.  Tests for this will soon be added to the testsuite.

gatekeeper.pl

index a9d1241183a35105103f606e8bebcc6ccb765e5e..f3a0708b3f8397032f3440e0cf34375598729d29 100755 (executable)
@@ -1021,6 +1021,9 @@ sub mail {
   # maintainer.
   shift(@email_list) if ($send_to_user);
 
+  # At minimum, an Internet email address must contain an @ character.
+  @email_list = grep m/@/, @email_list;
+
   if ($#email_list == -1) {
     # Something went wrong, but we can't figure out which package this
     # upload belongs to.  Mention that in the logs, and then mail this to