Incorrect use of check_public_key() in `id` command
When working on #237 (closed), and looking where check_public_key()
is used, I found a place where it is improperly used.
The boolean return value is used in id
to check whether the parameter is well a pubkey. But, check_public_key()
returns True
in case of a valid pubkey (and a valid corresponding checksum if specified). But, returns False
in two cases: wrong pubkey format, and wrong checksum. Thus, the id
command thinks the False
means the parameter is not a pubkey, but an uid.
In most cases this is fine, but if you specify a wrong checksum, then the id
commands thinks this is an uid
, and therefore try to find it on the network rather than stopping saying this is a wrong checksum.
This is not super critical, but this should be addressed one day.