From a8241c72df7cb6e5cff28e4b63d40b053659be09 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 4 Oct 2023 13:30:39 +0200 Subject: [PATCH] use url safe jingle session ids Movim does not like slashes (/) in jingle session ids. When proposing a session called 'wBKabx1kRIfkgNxAShip/w' Movim will accept (proceed) a session called 'wBKabx1kRIfkgNxAShip' which the initiator of course does not know about. (Conversations will get stuck at ringing/discovering devices) This is likely because a click on 'Reply' (accept call) in Movim opens upa pop up window where both the full jid as well as the session id are transmitted as part of the URL. (Full jids can contain more than on slash btw) --- .../conversations/xmpp/jingle/JingleConnectionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index 77737e5ae..1872f6b32 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -73,7 +73,7 @@ public class JingleConnectionManager extends AbstractConnectionManager { static String nextRandomId() { final byte[] id = new byte[16]; new SecureRandom().nextBytes(id); - return Base64.encodeToString(id, Base64.NO_WRAP | Base64.NO_PADDING); + return Base64.encodeToString(id, Base64.NO_WRAP | Base64.NO_PADDING | Base64.URL_SAFE); } public void deliverPacket(final Account account, final JinglePacket packet) {