Fix bug where IMDN messages gets encryption by LIME and the other party then treat the decrypted message as plain text.

This commit is contained in:
Ghislain MARY 2017-01-23 17:59:32 +01:00
parent 8a66d7eaa4
commit ee077ae5ad
2 changed files with 4 additions and 1 deletions

View file

@ -554,7 +554,7 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
}
}
if (retval < 0 && strcmp("text/plain", msg->content_type) != 0 && strcmp("message/external-body", msg->content_type) != 0
if (retval <= 0 && strcmp("text/plain", msg->content_type) != 0 && strcmp("message/external-body", msg->content_type) != 0
&& strcmp("application/vnd.gsma.rcs-ft-http+xml", msg->content_type) != 0) {
retval = 415;
ms_error("Unsupported MESSAGE (content-type %s not recognized)", msg->content_type);

View file

@ -952,6 +952,9 @@ int lime_im_encryption_engine_process_outgoing_message_cb(LinphoneImEncryptionEn
} else if (strcmp(msg->content_type, "application/im-iscomposing+xml") == 0) {
/* We don't encrypt composing messages */
return errcode;
} else if (strcmp(msg->content_type, "message/imdn+xml") == 0) {
/* We don't encrypt imdn messages */
return errcode;
}
}
msg->content_type = ms_strdup(content_type);