From cf93b87591987ad9eedabec127bb8e60bf68f76f Mon Sep 17 00:00:00 2001 From: Sebastien Clement Date: Tue, 17 Nov 2020 22:40:12 +0100 Subject: [PATCH] :ambulance: Use encodeURIComponent for passwords --- .../rootfs/opt/nextcloud_backup/tools/webdavTools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js b/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js index fc5cde5..8ddaea1 100644 --- a/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js +++ b/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js @@ -211,7 +211,7 @@ class WebdavTools { let options = { body: stream, username: this.username, - password: this.password, + password: encodeURIComponent(this.password), }; if (conf.ssl === "true") { options["https"] = { rejectUnauthorized: conf.self_signed === "false" }; @@ -306,7 +306,7 @@ class WebdavTools { let conf = this.getConf(); let options = { username: this.username, - password: encodeURI(this.password), + password: encodeURIComponent(this.password), }; if (conf.ssl === "true") { options["https"] = { rejectUnauthorized: conf.self_signed === "false" };