From fe3433e427d7d271fb1baf0e0a071550550ff9e9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 10 Aug 2022 09:11:09 +0200 Subject: [PATCH] do not accept empty credentials as ice-restart --- .../java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java index e95a7e36d..e7693d6a8 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java @@ -182,6 +182,9 @@ public class RtpContentMap { final IceUdpTransportInfo.Credentials credentials = Iterables.getFirst(allCredentials, null); if (allCredentials.size() == 1 && credentials != null) { + if (Strings.isNullOrEmpty(credentials.password) || Strings.isNullOrEmpty(credentials.ufrag)) { + throw new IllegalStateException("Credentials are missing password or ufrag"); + } return credentials; } throw new IllegalStateException("Content map does not have distinct credentials");