summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-08-26 03:46:51 +0300
committerLauri Ojansivu <x@xet7.org>2017-08-26 03:46:51 +0300
commit06644d9c714db046def9325612b64ab77a850c38 (patch)
treea5b58348f5c624d1eb3f9e546c2a05fb151ddb64
parent777b65b1f7f732e9df65e9b6460adad6399d9f65 (diff)
parenta4dfdd4fd1c3d74bddf4339fb75e4890486d4fab (diff)
downloadwekan-06644d9c714db046def9325612b64ab77a850c38.tar.gz
wekan-06644d9c714db046def9325612b64ab77a850c38.tar.bz2
wekan-06644d9c714db046def9325612b64ab77a850c38.zip
Merge branch 'pkuhner-fix-smtp-uri-malformed' into devel
Percent-encode SMTP password to prevent URI malformed errors. Thanks to pkuhner ! Closes #1181
-rw-r--r--CHANGELOG.md8
-rw-r--r--models/settings.js4
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5f93a6d..008e5608 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,10 +15,12 @@ This release adds the following new features:
and fixes the following bugs:
-* [Fix Squeezed tickbox in Card](https://github.com/wekan/wekan/pull/1171).
+* [Fix Squeezed tickbox in Card](https://github.com/wekan/wekan/pull/1171);
+* [Percent-encode SMTP password to prevent URI malformed
+ errors](https://github.com/wekan/wekan/pull/1190).
-Thanks to GitHub users andresmanelli, danhawkes, jonasob, kubiko, nztqa
-and xet7 for their contributions.
+Thanks to GitHub users andresmanelli, danhawkes, jonasob, kubiko, nztqa,
+pkuhner and xet7 for their contributions.
# v0.32 2017-07-30 Wekan release
diff --git a/models/settings.js b/models/settings.js
index ce162d45..a490d9c5 100644
--- a/models/settings.js
+++ b/models/settings.js
@@ -45,7 +45,7 @@ Settings.helpers({
if (!this.mailServer.username && !this.mailServer.password) {
return `${protocol}${this.mailServer.host}:${this.mailServer.port}/`;
}
- return `${protocol}${this.mailServer.username}:${this.mailServer.password}@${this.mailServer.host}:${this.mailServer.port}/`;
+ return `${protocol}${this.mailServer.username}:${encodeURIComponent(this.mailServer.password)}@${this.mailServer.host}:${this.mailServer.port}/`;
},
});
Settings.allow({
@@ -84,7 +84,7 @@ if (Meteor.isServer) {
if (!doc.mailServer.username && !doc.mailServer.password) {
process.env.MAIL_URL = `${protocol}${doc.mailServer.host}:${doc.mailServer.port}/`;
} else {
- process.env.MAIL_URL = `${protocol}${doc.mailServer.username}:${doc.mailServer.password}@${doc.mailServer.host}:${doc.mailServer.port}/`;
+ process.env.MAIL_URL = `${protocol}${doc.mailServer.username}:${encodeURIComponent(doc.mailServer.password)}@${doc.mailServer.host}:${doc.mailServer.port}/`;
}
Accounts.emailTemplates.from = doc.mailServer.from;
}