adium/adium

Parents 730f3ac03eaf
Children 6587cfa4e31b
Make sure details_for_context succeeded before prompting the user to verify an unknown OTR fingerprint. This should fix situations where it prompts to verify a fingerprint of "(null)" for "(null)", etc.

I think this can only occur when go_encrypted calls edata->ops->new_fingerprint, but then errors out before assigning edata->context->active_fingerprint (which could be otrl_dh_session failing due to a badly formed DH key). I therefore think it's safe to assume there is no active OTR session, so we should ignore the unknown fingerprint.
--- a/Source/AdiumOTREncryption.m Thu Apr 24 16:31:31 2014 +0200
+++ b/Source/AdiumOTREncryption.m Fri May 02 12:29:24 2014 +0200
@@ -1114,7 +1114,14 @@
responseInfo = details_for_context([contextValue pointerValue]);
- [ESOTRUnknownFingerprintController showUnknownFingerprintPromptWithResponseInfo:responseInfo];
+ if (responseInfo) {
+ [ESOTRUnknownFingerprintController showUnknownFingerprintPromptWithResponseInfo:responseInfo];
+ } else {
+ /* This means either context, context->active_fingerprint, context->active_fingerprint-fingerprint
+ * or context->active_fingerprint->context was NULL.
+ */
+ AILogWithSignature(@"Got a nil details_for_context for %p", [contextValue pointerValue]);
+ }
}
/*!