The PGP key server query builder omits leading zero(s) in 'keyId' parameter
khakim0v opened this issue · comments
Describe the bug
It appears that there is an issue with a PGP key server query building. The current format for constructing the request leads to leading zero(s) (if present) of 'keyid' being omitted. Which in turn causes an "Invalid request/Not found" error on a key server. Tested on keys.openpgp.org, keyserver.ubuntu.com and pgp.mit.edu.
Examples:
https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x04376F3EE0856959 (valid)
https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x4376F3EE0856959 (error)
Platform:
- MimeKit Version: 4.5.0
Expected behavior
The format string in code should be updated to "op=get&search=0x{0:X16}"
to correctly represent keyId
as a fixed-width string of 16 hex digits:
Released 4.6.0 with this fix