From 60ce55b0830dc67d9585040f87db9ee2134f2e4f Mon Sep 17 00:00:00 2001 From: DrosoCode Date: Fri, 4 Jun 2021 17:55:02 +0200 Subject: [PATCH] fix: escape file path --- frontend/src/views/files/OnlyOfficeEditor.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/files/OnlyOfficeEditor.vue b/frontend/src/views/files/OnlyOfficeEditor.vue index bfdb2b36..6b452392 100644 --- a/frontend/src/views/files/OnlyOfficeEditor.vue +++ b/frontend/src/views/files/OnlyOfficeEditor.vue @@ -85,12 +85,11 @@ export default { document.head.appendChild(onlyofficeScript); onlyofficeScript.onload = () => { - let fileUrl = `${window.location.protocol}// - ${window.location.host}${baseURL}/api/raw${url.encodePath( + let fileUrl = `${window.location.protocol}//${window.location.host}${baseURL}/api/raw${url.encodePath( this.req.path )}?auth=${this.jwt}`; - let key = Date.parse(this.req.modified).toString() + this.req.path; + let key = Date.parse(this.req.modified).toString() + url.encodePath(this.req.path); key = key.replaceAll(/[-_.!~[\]*'()/,;:\-%+.]/g, ""); if (key.length > 127) { key = key.substring(0, 127);