do not accept empty credentials as ice-restart

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/xmpp/jingle/RtpContentMap.java | 3 
1 file changed, 3 insertions(+)

Detailed changes

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");