From 27c0f1cb11ab6df222a54ef1495fe36b58a8bfa0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 20 Dec 2014 03:51:13 -0500 Subject: meta-normalize-stdio: fix a bug with email addresses not being validated --- bin/meta-normalize-stdio | 4 ++-- users/1022.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/meta-normalize-stdio b/bin/meta-normalize-stdio index 13e70ff..91af659 100755 --- a/bin/meta-normalize-stdio +++ b/bin/meta-normalize-stdio @@ -110,9 +110,9 @@ _email_regex = /^[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0 email_list = lambda {|name, ary| if ary.class != Array error "`#{name}' must be a list" - elsif ary.count > 1 + elsif not ary.empty? preserve = 1 - if ary.first.end_with?("@parabola.nu") and ary.count > 2 + if ary.first.end_with?("@parabola.nu") and ary.count >= 2 preserve = 2 end ary = semiordered_list(preserve, restring(_email_regex)).call(name, ary) diff --git a/users/1022.yml b/users/1022.yml index a078c8c..d179214 100644 --- a/users/1022.yml +++ b/users/1022.yml @@ -2,7 +2,7 @@ username: xihh fullname: Joshua Ismael Haase Hernández email: -- hahj87 at gmail dot com +- hahj87@gmail.com groups: - hackers pgp_keyid: 8BD5A323D71FE444D5FDA1FF24BE374E7B44ABF9 -- cgit v1.2.2