vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 19e0605d30384e04b5bba4a3aa34d40619f61add
parent 812387e5860daefba2e0f57237cc65ae330e6196
Author: Jean-Christophe BEGUE <jc.begue@devisubox.com>
Date:   Wed, 15 Aug 2018 10:17:05 +0200

Better message into the password hint email

Diffstat:
Msrc/mail.rs | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mail.rs b/src/mail.rs @@ -32,11 +32,17 @@ fn mailer(config: &MailConfig) -> SmtpTransport { } pub fn send_password_hint(address: &str, hint: &str, config: &MailConfig) -> Result<(), String> { + let body = format!( + "You (or someone) recently requested your master password hint.\n\n\ + Your hint is: \"{}\"\n\n\ + If you did not request your master password hint you can safely ignore this email.\n", + hint); + let email = EmailBuilder::new() .to(address) .from((config.smtp_from.to_owned(), "Bitwarden-rs")) .subject("Your Master Password Hint") - .body(hint) + .body(body) .build().unwrap(); match mailer(config).send(&email) {