fixed regression of not handling jingle content map parsing failures

This commit is contained in:
Daniel Gultsch 2021-10-05 15:43:05 +02:00
parent d0af5a002e
commit 20e4d108d4
2 changed files with 6 additions and 2 deletions

View file

@ -314,7 +314,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
} }
private ListenableFuture<RtpContentMap> receiveRtpContentMap(final JinglePacket jinglePacket, final boolean expectVerification) { private ListenableFuture<RtpContentMap> receiveRtpContentMap(final JinglePacket jinglePacket, final boolean expectVerification) {
final RtpContentMap receivedContentMap = RtpContentMap.of(jinglePacket); final RtpContentMap receivedContentMap;
try {
receivedContentMap = RtpContentMap.of(jinglePacket);
} catch (final Exception e) {
return Futures.immediateFailedFuture(e);
}
if (receivedContentMap instanceof OmemoVerifiedRtpContentMap) { if (receivedContentMap instanceof OmemoVerifiedRtpContentMap) {
final ListenableFuture<AxolotlService.OmemoVerifiedPayload<RtpContentMap>> future = id.account.getAxolotlService().decrypt((OmemoVerifiedRtpContentMap) receivedContentMap, id.with); final ListenableFuture<AxolotlService.OmemoVerifiedPayload<RtpContentMap>> future = id.account.getAxolotlService().decrypt((OmemoVerifiedRtpContentMap) receivedContentMap, id.with);
return Futures.transform(future, omemoVerifiedPayload -> { return Futures.transform(future, omemoVerifiedPayload -> {

View file

@ -159,7 +159,6 @@ public class RtpContentMap {
} else if (description instanceof RtpDescription) { } else if (description instanceof RtpDescription) {
rtpDescription = (RtpDescription) description; rtpDescription = (RtpDescription) description;
} else { } else {
Log.d(Config.LOGTAG, "description was " + description);
throw new UnsupportedApplicationException("Content does not contain rtp description"); throw new UnsupportedApplicationException("Content does not contain rtp description");
} }
if (transportInfo instanceof IceUdpTransportInfo) { if (transportInfo instanceof IceUdpTransportInfo) {