From d4551bb4fa008351d901fe6c5453735a1d2edecf Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Thu, 5 Jan 2017 12:09:25 +0100 Subject: Support base64-encoded JIDs, added for ChatSecure --- index.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'index.html') diff --git a/index.html b/index.html index f8b9baf..7b10278 100644 --- a/index.html +++ b/index.html @@ -47,6 +47,13 @@ function load_hash() { key_prefix = "chat."; var jid = window.location.search || window.location.hash; jid = decodeURIComponent(jid.substring(jid.indexOf('#') + 1, jid.length)); + try { + base_decoded = window.atob(jid); + if (base_decoded.search('@') >= 0) + jid = base_decoded; + } catch (err) { + // ignore error, JID wasn't base64 encoded + } if (jid.search("\\?join") >= 0) { muc = true; key_prefix = "muc."; -- cgit 1.4.1