From a5fc7c1ee5d6f7d79b44203249a0988673734a0d Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Tue, 12 May 2026 19:45:31 -0700 Subject: [PATCH] fix: decode URL hash in webui before parsing bucket/prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit window.location.hash returns the hash percent-encoded by the browser, so a prefix like "X Y/" is read back as "X%20Y/" (literal %20). Without decoding, all subsequent operations (list, upload, create folder) used the encoded string, causing the server to look for a directory named "X%20Y/" instead of "X Y/" — resulting in empty listings and uploads landing in a newly created "X%20Y/" directory. Fix by calling decodeURIComponent() on the hash before splitting into bucket and prefix parts. Fixes #2098 --- webui/web/explorer.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webui/web/explorer.html b/webui/web/explorer.html index 57235370..b541f708 100644 --- a/webui/web/explorer.html +++ b/webui/web/explorer.html @@ -1156,7 +1156,9 @@ under the License. async function init() { // Check URL hash for bucket/prefix - const hash = window.location.hash.slice(1); + // decodeURIComponent is needed because browsers percent-encode characters + // like spaces when storing the hash + const hash = decodeURIComponent(window.location.hash.slice(1)); if (hash) { const parts = hash.split('/'); const bucketName = parts[0];