From 460d9381d37258d1d0732a424ab6b8e5e11fac3a Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 24 Sep 2022 06:16:21 -0500 Subject: [PATCH] Use encode URI component for email --- scripts/server/email.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/server/email.js b/scripts/server/email.js index 319ac181..7593ad97 100644 --- a/scripts/server/email.js +++ b/scripts/server/email.js @@ -47,12 +47,12 @@ async function sendEmail(toEmail, toName, subject, body) { break; case AGRP_EMAIL_METHOD_GET_REQUEST: - let tempURL = getEmailConfig().http.baseUrl; - tempURL = tempURL.replace("{0}", encodeURI(password)); - tempURL = tempURL.replace("{1}", encodeURI(toEmail)); - tempURL = tempURL.replace("{2}", encodeURI(toName)); - tempURL = tempURL.replace("{3}", encodeURI(subject)); - tempURL = tempURL.replace("{4}", encodeURI(body)); + let tempURL = getEmailConfig().http.baseURL; + tempURL = tempURL.replace("{0}", encodeURIComponent(getEmailConfig().http.password)); + tempURL = tempURL.replace("{1}", encodeURIComponent(toEmail)); + tempURL = tempURL.replace("{2}", encodeURIComponent(toName)); + tempURL = tempURL.replace("{3}", encodeURIComponent(subject)); + tempURL = tempURL.replace("{4}", encodeURIComponent(body)); httpGet( tempURL,