Skip to content

Commit

Permalink
feat(smtp): allow unauthorized mail server certificates (#525)
Browse files Browse the repository at this point in the history
* 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 <login@eliasschneider.com>
  • Loading branch information
thecrafterjt and stonith404 authored Jul 11, 2024
1 parent 046c630 commit 083d82c
Show file tree
Hide file tree
Showing 26 changed files with 4,222 additions and 2,084 deletions.
6 changes: 6 additions & 0 deletions backend/prisma/seed/config.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ const configVariables: ConfigVariables = {
defaultValue: "false",
secret: false,
},
allowUnauthorizedCertificates: {
type: "boolean",
defaultValue: "false",

secret: false,
},
host: {
type: "string",
defaultValue: "",
Expand Down
5 changes: 5 additions & 0 deletions backend/src/email/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export class EmailService {
user: this.config.get("smtp.username"),
pass: this.config.get("smtp.password"),
},
tls: {
rejectUnauthorized: !this.config.get(
"smtp.allowUnauthorizedCertificates",
),
},
});
}

Expand Down
248 changes: 166 additions & 82 deletions frontend/src/i18n/translations/ar-EG.ts

Large diffs are not rendered by default.

278 changes: 186 additions & 92 deletions frontend/src/i18n/translations/da-DK.ts

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion frontend/src/i18n/translations/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ export default {
"admin.config.smtp.password": "Passwort",
"admin.config.smtp.password.description": "Passwort des SMTP-Servers",
"admin.config.smtp.button.test": "Test-E-Mail senden",
"admin.config.smtp.allow-unauthorized-certificates": "Vertrauen von nicht authentifizierten SMTP-Server-Zertifikaten",
"admin.config.smtp.allow-unauthorized-certificates.description": "Verwenden Sie diese Option nur, wenn Sie selbst signierten Zertifikaten vertrauen müssen.",
"admin.config.oauth.allow-registration": "Registrierung erlauben",
"admin.config.oauth.allow-registration.description": "Benutzern erlauben, sich über Soziale Netzwerke zu registrieren",
"admin.config.oauth.ignore-totp": "TOTP ignorieren",
Expand Down Expand Up @@ -439,4 +441,4 @@ export default {
"common.error.exact-length": "Muss genau {length} Zeichen lang sein",
"common.error.invalid-number": "Muss eine Zahl sein",
"common.error.field-required": "Dieses Feld ist erforderlich"
};
};
356 changes: 238 additions & 118 deletions frontend/src/i18n/translations/el-GR.ts

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions frontend/src/i18n/translations/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,8 @@ export default {
"admin.config.general.show-home-page": "Show home page",
"admin.config.general.show-home-page.description":
"Whether to show the home page",
"admin.config.general.session-duration":
"Session Duration",
"admin.config.general.session-duration.description":
"admin.config.general.session-duration": "Session Duration",
"admin.config.general.session-duration.description":
"Time in hours after which a user must log in again (default: 3 months).",
"admin.config.general.logo": "Logo",
"admin.config.general.logo.description":
Expand Down Expand Up @@ -454,9 +453,11 @@ export default {
"admin.config.share.zip-compression-level.description":
"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. ",
"admin.config.share.chunk-size": "Chunk size",
"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.",
"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.",
"admin.config.share.auto-open-share-modal": "Auto open create share modal",
"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.",
"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.",

"admin.config.smtp.enabled": "Enabled",
"admin.config.smtp.enabled.description":
Expand All @@ -473,6 +474,10 @@ export default {
"admin.config.smtp.password": "Password",
"admin.config.smtp.password.description": "Password of the SMTP server",
"admin.config.smtp.button.test": "Send test email",
"admin.config.smtp.allow-unauthorized-certificates":
"Trust unauthorized SMTP server certificates",
"admin.config.smtp.allow-unauthorized-certificates.description":
"Only set this to true if you need to trust self signed certificates.",

"admin.config.oauth.allow-registration": "Allow registration",
"admin.config.oauth.allow-registration.description":
Expand Down
323 changes: 216 additions & 107 deletions frontend/src/i18n/translations/es-ES.ts

Large diffs are not rendered by default.

291 changes: 194 additions & 97 deletions frontend/src/i18n/translations/fi-FI.ts

Large diffs are not rendered by default.

314 changes: 210 additions & 104 deletions frontend/src/i18n/translations/fr-FR.ts

Large diffs are not rendered by default.

302 changes: 202 additions & 100 deletions frontend/src/i18n/translations/hu-HU.ts

Large diffs are not rendered by default.

332 changes: 222 additions & 110 deletions frontend/src/i18n/translations/it-IT.ts

Large diffs are not rendered by default.

281 changes: 188 additions & 93 deletions frontend/src/i18n/translations/ja-JP.ts

Large diffs are not rendered by default.

245 changes: 164 additions & 81 deletions frontend/src/i18n/translations/ko-KR.ts

Large diffs are not rendered by default.

308 changes: 206 additions & 102 deletions frontend/src/i18n/translations/nl-BE.ts

Large diffs are not rendered by default.

317 changes: 212 additions & 105 deletions frontend/src/i18n/translations/pl-PL.ts

Large diffs are not rendered by default.

344 changes: 230 additions & 114 deletions frontend/src/i18n/translations/pt-BR.ts

Large diffs are not rendered by default.

293 changes: 196 additions & 97 deletions frontend/src/i18n/translations/ru-RU.ts

Large diffs are not rendered by default.

287 changes: 192 additions & 95 deletions frontend/src/i18n/translations/sl-SI.ts

Large diffs are not rendered by default.

281 changes: 188 additions & 93 deletions frontend/src/i18n/translations/sr-SP.ts

Large diffs are not rendered by default.

287 changes: 192 additions & 95 deletions frontend/src/i18n/translations/sv-SE.ts

Large diffs are not rendered by default.

263 changes: 176 additions & 87 deletions frontend/src/i18n/translations/th-TH.ts

Large diffs are not rendered by default.

272 changes: 182 additions & 90 deletions frontend/src/i18n/translations/tr-TR.ts

Large diffs are not rendered by default.

311 changes: 208 additions & 103 deletions frontend/src/i18n/translations/uk-UA.ts

Large diffs are not rendered by default.

164 changes: 110 additions & 54 deletions frontend/src/i18n/translations/zh-CN.ts

Large diffs are not rendered by default.

179 changes: 120 additions & 59 deletions frontend/src/i18n/translations/zh-TW.ts

Large diffs are not rendered by default.

0 comments on commit 083d82c

Please sign in to comment.