Page MenuHome GnuPG

gpg's email address correctness test is overly strict
Closed, ResolvedPublic

Description

Per RFC2822, section 3.4.1, the local-part of an email address is made up of
"dot-atom" (... I'm going to pretend the entire quoted thing doesn't exist).

Up in section 3.2.4, dot-atom is basically comprised of a series of one or more
"atoms", separated by periods. An atom is basically a bunch of alphanumeric
text, *or* any of the following special characters:

! # $ % & ' * + - / = ? ^ _ ` { | } ~

Its actually very lax, primarily because the local-part is supposed to only be
meaningful to the final destination, and the final destination may want to do
silly things with it.

However, on line 1220 of misc.c, in the has_invalid_email_chars, its using an
extremely restrictive list of just underscore, dash and dot as allowable. This
is very unfortunate, as there are some very real email addresses (and
specialized email functionality) out there which it disallows for no good
reason, making it so I can't adduid a proper uid to my key.

(FWIW, the list of allowable characters is unchanged from the superseded RFC822
which the comment claims to implement, but doesn't entirely).

This is with gpg 2.0.14, but I checked the code in 2.0.15 and its still
restrictive.

The only bug or thread or what-ever I could find related to this with limited
Google-fu was http://marc.info/?l=gnupg-devel&m=103746891012025&w=2 -- but he
was concerned with quoted strings in the local part. Which I'm totally
pretending don't exist for the purposes of this bug report.

Details

Version
2.0.15

Event Timeline

ixokai added projects: gnupg, Bug Report.
ixokai added a subscriber: ixokai.
ixokai lowered the priority of this task from Unbreak Now! to Normal.Jun 10 2010, 2:13 AM

... and I found --allow-freeform-uid, so its not stopping me from using gpg
anymore. So! Uncritting.

werner added a subscriber: werner.

This a feature and not a bug ;-)

werner claimed this task.