mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
ox: print invalid fingerprint instead of aborting
Asserting here is not the right thing to do at all. A person could have a typo in the fingerprint. Or like in the case of the reported bug just confuse the arguments. An additional check for valid jid should be added later to the calling function maybe. Fix https://github.com/profanity-im/profanity/issues/1698
This commit is contained in:
parent
866f688621
commit
c8b88733ef
@ -340,7 +340,11 @@ _ox_request_public_key(const char* const jid, const char* const fingerprint)
|
|||||||
{
|
{
|
||||||
assert(jid);
|
assert(jid);
|
||||||
assert(fingerprint);
|
assert(fingerprint);
|
||||||
assert(strlen(fingerprint) == KEYID_LENGTH);
|
|
||||||
|
if (strlen(fingerprint) != KEYID_LENGTH) {
|
||||||
|
cons_show_error("Invalid fingerprint length for: %s", fingerprint);
|
||||||
|
}
|
||||||
|
|
||||||
cons_show("Requesting Public Key %s for %s", fingerprint, jid);
|
cons_show("Requesting Public Key %s for %s", fingerprint, jid);
|
||||||
log_info("[OX] Request %s's public key %s.", jid, fingerprint);
|
log_info("[OX] Request %s's public key %s.", jid, fingerprint);
|
||||||
// iq
|
// iq
|
||||||
|
Loading…
Reference in New Issue
Block a user