Skip to content

Commit

Permalink
🚑 Use encodeURIComponent for passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebclem committed Nov 17, 2020
1 parent c4f5b00 commit cf93b87
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
Expand Down Expand Up @@ -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" };
Expand Down

0 comments on commit cf93b87

Please sign in to comment.