fix: correctly handle non-ascii passwords for shared resources

This commit is contained in:
Oleg Lobanov committed 2022-02-21 20:47:28 +01:00
1 parent 0942fc7042
commit c782f21b0f
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ export async function fetch(url, password = "") {
url = removePrefix(url);
const res = await fetchURL(`/api/public/share${url}`, {
headers: { "X-SHARE-PASSWORD": password },
headers: { "X-SHARE-PASSWORD": encodeURIComponent(password) },
});
if (res.status === 200) {