Skip to content

x/crypto/openpgp: E-mail address is not detected and misplaced into the name field #39879

@ghost

Description

What version of Go are you using (go version)?

The Go Playground say's it's the latest stable so 1.14.3

Does this issue reproduce with the latest release?

Yes, it does.

What operating system and processor architecture are you using (go env)?

Irrelevant, reproduceable on the playground

What did you do?

When generating a key with GnuPG if you skip the "Real name" by hitting enter it leaves just the email address without angled brackets.
A very big screenshot

What the library sees:

As GitHub uses this library to parse e-mail addresses from the key it did not detect my e-mail address. You can verify this by adding a key like this one to your GitHub account. (Screenshot provided.) I opened a ticket and I was made aware that GitHub uses this library, so I headed here to open this issue.
Screenshot from 2020-06-24 20-25-40

As a consequence of that, the commits I sign don't appear with the "Verified" badge.

Screenshot from 2020-06-24 20-29-45

As most people use GnuPG to generate their keys some might be in this form. I think it is a good idea to try and detect this pattern and not necessarily require angle brackets.

What did you expect to see?

id: yesplease <no@thanks>     name:yesplease       mail:no@thanks      
id: yes@please                name:                mail:yes@please

What did you see instead?

id: yesplease <no@thanks>     name:yesplease       mail:no@thanks      
id: yes@please                name:yes@please      mail:            

(Now that I think of it, this might be a bad example as it misses the TLD e.g. please.com but it wouldn't recognize it as email either way)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions