Page MenuHome GnuPG

gpgkeys_mailto fails with --send-key
Closed, ResolvedPublic

Description

Release: 1.2.1

Environment

linux

How To Repeat

when submitting a key with:

$ gpg --keyserver-options=verbose --keyserver mailto:pgp-public-keys@keys.pgp.net --send-key colliera@nu.ac.za

the following error is logged on the terminal:

Use of uninitialized value in concatenation (.) or string at /usr/local/libexec/gnupg/gpgkeys_mailto line 199, <STDIN> line 37.

this appears to be due to the fact that variable $key is not initialised. an extract from the perl debug output:

(/usr/local/libexec/gnupg/gpgkeys_mailto:178) match
Guessing start of match, REx ^KEY (\w+) BEGIN$' against KEY colliera@nu.ac.za
BEGIN
'...
Found floating substr ` BEGIN'$ at offset 21...
Found anchored substr `KEY ' at offset 0...
Guessed: match at offset 0
Matching REx ^KEY (\w+) BEGIN$' against KEY colliera@nu.ac.za BEGIN
'

Setting an EVAL scope, savestack=14
 0 <> <KEY colliera>    |  1:  BOL
 0 <> <KEY colliera>    |  2:  EXACT <KEY >
 4 <KEY > <colliera>    |  4:  OPEN1
 4 <KEY > <colliera>    |  6:  PLUS 
                         ALNUM can match 8 times out of 2147483647...
Setting an EVAL scope, savestack=14
                          failed...

Match failed

=>  SV_NO

this appears to indicate that the regular expression fails to match (sorry, don't know much about perl myself!).

Fix

After some consideration, I've fixed this by changing the regexp in
gpgkeys_mailto. This is the smallest change possible on the stable
branch.