From eed26e339597c448a2aecdf226fd53f70ae8b383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Thu, 22 Feb 2024 09:58:54 +0100 Subject: [PATCH] Fixes #3492 joining after document is renamed inside editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 1. Open document 2. Rename in Collabora Online using input in the title bar 3. In the new tab open the same document from file picker in NC Result: 2 sessions are in different instances of the same document getCallbackBaseUrl() puts "/" at the end, but WOPISrc was adding additional one: const wopiurl = getCallbackBaseUrl() + '/ ... Then reconnected session after rename had single "/index.php" but new session used "//index.php" what caused that COOL server didn't consider both as the same identifier Signed-off-by: Szymon Kłos --- src/helpers/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/url.js b/src/helpers/url.js index 09d637628c..c2e7053f84 100644 --- a/src/helpers/url.js +++ b/src/helpers/url.js @@ -34,7 +34,7 @@ const getSearchParam = (name) => { const getCallbackBaseUrl = () => { const callbackUrl = Config.get('wopi_callback_url') - return callbackUrl || window.location.protocol + '//' + window.location.host + getRootUrl() + '/' + return callbackUrl || window.location.protocol + '//' + window.location.host + getRootUrl() } const getWopiSrc = (fileId) => {