mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
:amblance: encodeURI on download too
This commit is contained in:
parent
a0ff15d716
commit
8c03b24bc4
@ -211,7 +211,7 @@ class WebdavTools {
|
|||||||
let options = {
|
let options = {
|
||||||
body: stream,
|
body: stream,
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: encodeURI(this.password),
|
password: this.password,
|
||||||
};
|
};
|
||||||
if (conf.ssl === "true") {
|
if (conf.ssl === "true") {
|
||||||
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
||||||
@ -266,7 +266,7 @@ class WebdavTools {
|
|||||||
status.message = `Fail to upload snapshot to nextcloud (${err}) !`;
|
status.message = `Fail to upload snapshot to nextcloud (${err}) !`;
|
||||||
statusTools.setStatus(status);
|
statusTools.setStatus(status);
|
||||||
logger.error(status.message);
|
logger.error(status.message);
|
||||||
logger.error(err);
|
logger.error(err?.stack);
|
||||||
reject(status.message);
|
reject(status.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -306,7 +306,7 @@ class WebdavTools {
|
|||||||
let conf = this.getConf();
|
let conf = this.getConf();
|
||||||
let options = {
|
let options = {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
password: encodeURI(this.password),
|
||||||
};
|
};
|
||||||
if (conf.ssl === "true") {
|
if (conf.ssl === "true") {
|
||||||
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
options["https"] = { rejectUnauthorized: conf.self_signed === "false" };
|
||||||
@ -336,7 +336,7 @@ class WebdavTools {
|
|||||||
status.error_code = 7;
|
status.error_code = 7;
|
||||||
statusTools.setStatus(status);
|
statusTools.setStatus(status);
|
||||||
logger.error(status.message);
|
logger.error(status.message);
|
||||||
logger.error(err);
|
logger.error(err?.stack);
|
||||||
reject(err.message);
|
reject(err.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user