From 8e373fe9bfb17858324a50d33161104884408515 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Wed, 24 Jul 2024 16:33:41 +0800 Subject: [PATCH] misc: added email formatting for remaining templates --- backend/src/services/smtp/smtp-service.ts | 2 +- .../smtp/templates/historicalSecretLeakIncident.handlebars | 4 ++-- .../src/services/smtp/templates/secretLeakIncident.handlebars | 4 ++-- .../smtp/templates/signupEmailVerification.handlebars | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/services/smtp/smtp-service.ts b/backend/src/services/smtp/smtp-service.ts index 5e090b4c6..95407d0b0 100644 --- a/backend/src/services/smtp/smtp-service.ts +++ b/backend/src/services/smtp/smtp-service.ts @@ -51,7 +51,7 @@ export const smtpServiceFactory = (cfg: TSmtpConfig) => { const appCfg = getConfig(); const html = await fs.readFile(path.resolve(__dirname, "./templates/", template), "utf8"); const temp = handlebars.compile(html); - const htmlToSend = temp({ ...substitutions, isCloud: appCfg.isCloud }); + const htmlToSend = temp({ isCloud: appCfg.isCloud, siteUrl: appCfg.SITE_URL, ...substitutions }); if (isSmtpOn) { await smtp.sendMail({ diff --git a/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars b/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars index 3cb517a57..0798538fb 100644 --- a/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars +++ b/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars @@ -9,12 +9,12 @@

Infisical has uncovered {{numberOfSecrets}} secret(s) from historical commits to your repo

-

View leaked secrets

+

View leaked secrets

If these are production secrets, please rotate them immediately.

Once you have taken action, be sure to update the status of the risk in your Infisical + href="{{siteUrl}}">Infisical dashboard.

diff --git a/backend/src/services/smtp/templates/secretLeakIncident.handlebars b/backend/src/services/smtp/templates/secretLeakIncident.handlebars index 1bf2d3175..c3c5f353a 100644 --- a/backend/src/services/smtp/templates/secretLeakIncident.handlebars +++ b/backend/src/services/smtp/templates/secretLeakIncident.handlebars @@ -9,7 +9,7 @@

Infisical has uncovered {{numberOfSecrets}} secret(s) from your recent push

-

View leaked secrets

+

View leaked secrets

You are receiving this notification because one or more secret leaks have been detected in a recent commit pushed by {{pusher_name}} ({{pusher_email}}). If these are test secrets, please add `infisical-scan:ignore` at the end of the line containing the secret as comment @@ -18,7 +18,7 @@

If these are production secrets, please rotate them immediately.

Once you have taken action, be sure to update the status of the risk in your Infisical + href="{{siteUrl}}">Infisical dashboard.

diff --git a/backend/src/services/smtp/templates/signupEmailVerification.handlebars b/backend/src/services/smtp/templates/signupEmailVerification.handlebars index fc738d202..3ba18619f 100644 --- a/backend/src/services/smtp/templates/signupEmailVerification.handlebars +++ b/backend/src/services/smtp/templates/signupEmailVerification.handlebars @@ -11,7 +11,7 @@

Confirm your email address

Your confirmation code is below — enter it in the browser window where you've started signing up for Infisical.

{{code}}

-

Questions about setting up Infisical? Email us at support@infisical.com

+

Questions about setting up Infisical? {{#if isCloud}}Email us at support@infisical.com{{else}}Contact your administrator{{/if}}.

\ No newline at end of file