diff options
author | Florian Pritz <bluewind@xinu.at> | 2023-01-08 10:31:11 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2023-01-08 10:32:28 +0100 |
commit | a04b7082eafca75a8b798494e29eb929a7cec8e7 (patch) | |
tree | 4d5642cb8326be67a88ca29d0c94684c9998427a | |
parent | 1f10507c4f23b53fb09a431f22580f6b08ec9970 (diff) | |
download | bin-a04b7082eafca75a8b798494e29eb929a7cec8e7.tar.gz bin-a04b7082eafca75a8b798494e29eb929a7cec8e7.tar.xz |
masterkey.pl: Accept keys with unparsable UIDs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | masterkey.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/masterkey.pl b/masterkey.pl index 72ede20..e82b350 100755 --- a/masterkey.pl +++ b/masterkey.pl @@ -144,12 +144,14 @@ fun gpg_get_users($key) { my $user = Encode::decode('utf8', $uid->as_string); unless ($user =~ m/^(?<name>.*?) (?:\((?<comment>.*?)\) )?\<(?<email>.*?@.*?)\>$/) { - die "Failed to parse GPG user information for key $key; got $user"; + warn "Warning: Failed to parse GPG user information for key $key; got '$user'. Ignoring...\n"; } push @users, {%+}; } + die "Failed to parse even one UID from key. Giving up" unless (0+@users > 0); + return \@users; } |