[PR #900] Fix escaping of SMTP_AUTH_MECHANISM in .env.template #3611

Closed
opened 2025-10-09 18:26:40 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/dani-garcia/vaultwarden/pull/900

State: closed
Merged: No


Correctly escapes the quotation marks of the SMTP_AUTH_MECHANISM variable in .env.template.
The file is sourced by the shell and swallows the simple quotation marks.
However, we need a proper JSON value, that is, it has to have quotation marks.
Otherwise, we get the error

thread '<unnamed>' panicked at 'Failure to parse mechanism. Is it proper Json? Eg. `"Plain"` not `Plain`', src/mail.rs:52:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is fixed by adding escaped quotation marks.

**Original Pull Request:** https://github.com/dani-garcia/vaultwarden/pull/900 **State:** closed **Merged:** No --- Correctly escapes the quotation marks of the `SMTP_AUTH_MECHANISM` variable in `.env.template`. The file is sourced by the shell and swallows the simple quotation marks. However, we need a proper JSON value, that is, it has to have quotation marks. Otherwise, we get the error ``` thread '<unnamed>' panicked at 'Failure to parse mechanism. Is it proper Json? Eg. `"Plain"` not `Plain`', src/mail.rs:52:22 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` This is fixed by adding escaped quotation marks.
OVERLORD added the pull-request label 2025-10-09 18:26:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3611