mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge pull request #1699 from profanity-im/1698-fixoxabrt
Fix SIGABRT when using wrong argument order for receiving ox key
This commit is contained in:
commit
196fdd9cb9
@ -7503,11 +7503,6 @@ cmd_pgp(ProfWin* window, const char* const command, gchar** args)
|
|||||||
|
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Command for XEP-0373: OpenPGP for XMPP
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
cmd_ox(ProfWin* window, const char* const command, gchar** args)
|
cmd_ox(ProfWin* window, const char* const command, gchar** args)
|
||||||
{
|
{
|
||||||
@ -7700,7 +7695,7 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
|
|||||||
cons_show("JID and OpenPGP Key ID are required");
|
cons_show("JID and OpenPGP Key ID are required");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cons_show("OX not implemented");
|
cons_bad_cmd_usage(command);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -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