fix: escape file path
This commit is contained in:
parent
052fcd8e1e
commit
928806e7c4
@ -85,12 +85,11 @@ export default {
|
|||||||
document.head.appendChild(onlyofficeScript);
|
document.head.appendChild(onlyofficeScript);
|
||||||
|
|
||||||
onlyofficeScript.onload = () => {
|
onlyofficeScript.onload = () => {
|
||||||
let fileUrl = `${window.location.protocol}//
|
let fileUrl = `${window.location.protocol}//${window.location.host}${baseURL}/api/raw${url.encodePath(
|
||||||
${window.location.host}${baseURL}/api/raw${url.encodePath(
|
|
||||||
this.req.path
|
this.req.path
|
||||||
)}?auth=${this.jwt}`;
|
)}?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, "");
|
key = key.replaceAll(/[-_.!~[\]*'()/,;:\-%+.]/g, "");
|
||||||
if (key.length > 127) {
|
if (key.length > 127) {
|
||||||
key = key.substring(0, 127);
|
key = key.substring(0, 127);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user