Skip to content

Commit 083d82c

Browse files
feat(smtp): allow unauthorized mail server certificates (#525)
* Update config.seed.ts Added Config Option "allowUnauthenticatedCertificates". * Update email.service.ts Now using new Config Option "allowUnauthenticatedCertificates". * Update en-US.ts * Update ar-EG.ts * Update da-DK.ts * Update el-GR.ts * Update es-ES.ts * Update fi-FI.ts * Update fr-FR.ts * Update hu-HU.ts * Update it-IT.ts * Update ja-JP.ts * Update ko-KR.ts * Update nl-BE.ts * Update pl-PL.ts * Update pt-BR.ts * Update ru-RU.ts * Update sl-SI.ts * Update sr-SP.ts * Update sv-SE.ts * Update th-TH.ts * Update tr-TR.ts * Update uk-UA.ts * Update zh-CN.ts * Update zh-TW.ts * Update config.seed.ts * Update email.service.ts * Update de-DE.ts * Add files via upload rename allow-unauthenticated-certificates to allow-unauthorized-certificates * Add files via upload rename allowUnauthenticatedCertificates to allowUnauthorizedCertificates * Add files via upload rename allowUnauthenticatedCertificates to allowUnauthorizedCertificates * rename "unauthenticated" to "unauthorized" * refactor: run formatter --------- Co-authored-by: Elias Schneider <[email protected]>
1 parent 046c630 commit 083d82c

File tree

26 files changed

+4222
-2084
lines changed

26 files changed

+4222
-2084
lines changed

backend/prisma/seed/config.seed.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ const configVariables: ConfigVariables = {
116116
defaultValue: "false",
117117
secret: false,
118118
},
119+
allowUnauthorizedCertificates: {
120+
type: "boolean",
121+
defaultValue: "false",
122+
123+
secret: false,
124+
},
119125
host: {
120126
type: "string",
121127
defaultValue: "",

backend/src/email/email.service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export class EmailService {
2525
user: this.config.get("smtp.username"),
2626
pass: this.config.get("smtp.password"),
2727
},
28+
tls: {
29+
rejectUnauthorized: !this.config.get(
30+
"smtp.allowUnauthorizedCertificates",
31+
),
32+
},
2833
});
2934
}
3035

frontend/src/i18n/translations/ar-EG.ts

Lines changed: 166 additions & 82 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/da-DK.ts

Lines changed: 186 additions & 92 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/de-DE.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ export default {
345345
"admin.config.smtp.password": "Passwort",
346346
"admin.config.smtp.password.description": "Passwort des SMTP-Servers",
347347
"admin.config.smtp.button.test": "Test-E-Mail senden",
348+
"admin.config.smtp.allow-unauthorized-certificates": "Vertrauen von nicht authentifizierten SMTP-Server-Zertifikaten",
349+
"admin.config.smtp.allow-unauthorized-certificates.description": "Verwenden Sie diese Option nur, wenn Sie selbst signierten Zertifikaten vertrauen müssen.",
348350
"admin.config.oauth.allow-registration": "Registrierung erlauben",
349351
"admin.config.oauth.allow-registration.description": "Benutzern erlauben, sich über Soziale Netzwerke zu registrieren",
350352
"admin.config.oauth.ignore-totp": "TOTP ignorieren",
@@ -439,4 +441,4 @@ export default {
439441
"common.error.exact-length": "Muss genau {length} Zeichen lang sein",
440442
"common.error.invalid-number": "Muss eine Zahl sein",
441443
"common.error.field-required": "Dieses Feld ist erforderlich"
442-
};
444+
};

frontend/src/i18n/translations/el-GR.ts

Lines changed: 238 additions & 118 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/en-US.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,8 @@ export default {
400400
"admin.config.general.show-home-page": "Show home page",
401401
"admin.config.general.show-home-page.description":
402402
"Whether to show the home page",
403-
"admin.config.general.session-duration":
404-
"Session Duration",
405-
"admin.config.general.session-duration.description":
403+
"admin.config.general.session-duration": "Session Duration",
404+
"admin.config.general.session-duration.description":
406405
"Time in hours after which a user must log in again (default: 3 months).",
407406
"admin.config.general.logo": "Logo",
408407
"admin.config.general.logo.description":
@@ -454,9 +453,11 @@ export default {
454453
"admin.config.share.zip-compression-level.description":
455454
"Adjust the level to balance between file size and compression speed. Valid values range from 0 to 9, with 0 being no compression and 9 being maximum compression. ",
456455
"admin.config.share.chunk-size": "Chunk size",
457-
"admin.config.share.chunk-size.description": "Adjust the chunk size (in bytes) for your uploads to balance efficiency and reliability according to your internet connection. Smaller chunks can enhance success rates for unstable connections, while larger chunks speed up uploads for stable connections.",
456+
"admin.config.share.chunk-size.description":
457+
"Adjust the chunk size (in bytes) for your uploads to balance efficiency and reliability according to your internet connection. Smaller chunks can enhance success rates for unstable connections, while larger chunks speed up uploads for stable connections.",
458458
"admin.config.share.auto-open-share-modal": "Auto open create share modal",
459-
"admin.config.share.auto-open-share-modal.description": "The share creation modal automatically appears when a user selects files, eliminating the need to manually click the button.",
459+
"admin.config.share.auto-open-share-modal.description":
460+
"The share creation modal automatically appears when a user selects files, eliminating the need to manually click the button.",
460461

461462
"admin.config.smtp.enabled": "Enabled",
462463
"admin.config.smtp.enabled.description":
@@ -473,6 +474,10 @@ export default {
473474
"admin.config.smtp.password": "Password",
474475
"admin.config.smtp.password.description": "Password of the SMTP server",
475476
"admin.config.smtp.button.test": "Send test email",
477+
"admin.config.smtp.allow-unauthorized-certificates":
478+
"Trust unauthorized SMTP server certificates",
479+
"admin.config.smtp.allow-unauthorized-certificates.description":
480+
"Only set this to true if you need to trust self signed certificates.",
476481

477482
"admin.config.oauth.allow-registration": "Allow registration",
478483
"admin.config.oauth.allow-registration.description":

frontend/src/i18n/translations/es-ES.ts

Lines changed: 216 additions & 107 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/fi-FI.ts

Lines changed: 194 additions & 97 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/fr-FR.ts

Lines changed: 210 additions & 104 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/hu-HU.ts

Lines changed: 202 additions & 100 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/it-IT.ts

Lines changed: 222 additions & 110 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/ja-JP.ts

Lines changed: 188 additions & 93 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/ko-KR.ts

Lines changed: 164 additions & 81 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/nl-BE.ts

Lines changed: 206 additions & 102 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/pl-PL.ts

Lines changed: 212 additions & 105 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/pt-BR.ts

Lines changed: 230 additions & 114 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/ru-RU.ts

Lines changed: 196 additions & 97 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/sl-SI.ts

Lines changed: 192 additions & 95 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/sr-SP.ts

Lines changed: 188 additions & 93 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/sv-SE.ts

Lines changed: 192 additions & 95 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/th-TH.ts

Lines changed: 176 additions & 87 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/tr-TR.ts

Lines changed: 182 additions & 90 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/uk-UA.ts

Lines changed: 208 additions & 103 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/zh-CN.ts

Lines changed: 110 additions & 54 deletions
Large diffs are not rendered by default.

frontend/src/i18n/translations/zh-TW.ts

Lines changed: 120 additions & 59 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)