From 5ff1c4ba3b824fe85e83c69c4dc4ec0ae605f431 Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Tue, 14 Apr 2026 11:32:19 -0700 Subject: [PATCH] fix: use encodeS3Key in webui instead of encodeURIComponent in createFolder encodeURIComponent encodes the trailing slash as %2F, producing a path like /bucket/folder%2F. S3 servers (e.g. Ceph) reject this with a SignatureDoesNotMatch error because the canonical URI used for signing differs from what the server reconstructs. encodeS3Key encodes each path segment individually, leaving slashes as literal /, which is consistent with all other object-key operations in the API client. Fixes #2029 --- webui/web/js/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui/web/js/api.js b/webui/web/js/api.js index 0e9fd1de..7f8a0c2e 100644 --- a/webui/web/js/api.js +++ b/webui/web/js/api.js @@ -1334,7 +1334,7 @@ class VersityAPI { // Ensure prefix ends with / const folderKey = prefix.endsWith('/') ? prefix : prefix + '/'; - const fetchParams = await this.buildFetchParams('PUT', `/${bucket}/${encodeURIComponent(folderKey)}`, {}, ''); + const fetchParams = await this.buildFetchParams('PUT', `/${bucket}/${encodeS3Key(folderKey)}`, {}, ''); const response = await fetch(fetchParams.url, { method: 'PUT',