diff options
author | Andrés Maldonado <[email protected]> | 2023-01-03 11:19:09 +0100 |
---|---|---|
committer | Andrés Maldonado <[email protected]> | 2023-01-03 12:51:44 +0100 |
commit | 2897c24e838b64e14aa273602b9dea5ff65f3fc6 (patch) | |
tree | 36d92d4d1059732369107b788fcec213caa79c25 /src/mail.rs | |
parent | 10dadfca068ed449fcd4a74b70ae2cd83990d3d4 (diff) | |
download | vaultwarden-2897c24e838b64e14aa273602b9dea5ff65f3fc6.tar.gz vaultwarden-2897c24e838b64e14aa273602b9dea5ff65f3fc6.zip |
Percent-encode org_name in links
If org_name contains spaces, the generated link will not work in some email clients unless it is percent-encoded
Diffstat (limited to 'src/mail.rs')
-rw-r--r-- | src/mail.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mail.rs b/src/mail.rs index af0f8c7c..c77f406e 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -245,6 +245,7 @@ pub async fn send_invite( "org_id": org_id.as_deref().unwrap_or("_"), "org_user_id": org_user_id.as_deref().unwrap_or("_"), "email": percent_encode(address.as_bytes(), NON_ALPHANUMERIC).to_string(), + "org_name_encoded": percent_encode(org_name.as_bytes(), NON_ALPHANUMERIC).to_string(), "org_name": org_name, "token": invite_token, }), |