[PR #5100] [MERGED] Fix org invite url being html encoded #2658

Open
opened 2025-10-09 18:09:11 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5100
Author: @BlackDex
Created: 10/18/2024
Status: Merged
Merged: 10/18/2024
Merged by: @dani-garcia

Base: mainHead: fix-invite-url-template


📝 Commits (1)

  • 866b119 Fix org invite url being html encoded

📊 Changes

3 files changed (+5 additions, -6 deletions)

View changed files

📝 src/api/core/organizations.rs (+3 -4)
📝 src/static/templates/email/send_org_invite.hbs (+1 -1)
📝 src/static/templates/email/send_org_invite.html.hbs (+1 -1)

📄 Description

Ever since we changed to pass the full url as a template value handlebars now html-encodes this. This causes issues with the plain/text mails, but it also could potentially cause issues with the text/html templates.

This PR encloses the template values inside triple braces {{{ }}} which prevents html-encoding. Since the URL is generated via the url crate the values are percent-encoded anyway.

Fixes #5097


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/5100 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/18/2024 **Status:** ✅ Merged **Merged:** 10/18/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-invite-url-template` --- ### 📝 Commits (1) - [`866b119`](https://github.com/dani-garcia/vaultwarden/commit/866b1196bea53d00418f770c5078c134cb9c853c) Fix org invite url being html encoded ### 📊 Changes **3 files changed** (+5 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/organizations.rs` (+3 -4) 📝 `src/static/templates/email/send_org_invite.hbs` (+1 -1) 📝 `src/static/templates/email/send_org_invite.html.hbs` (+1 -1) </details> ### 📄 Description Ever since we changed to pass the full url as a template value handlebars now html-encodes this. This causes issues with the plain/text mails, but it also could potentially cause issues with the text/html templates. This PR encloses the template values inside triple braces `{{{ }}}` which prevents html-encoding. Since the URL is generated via the `url` crate the values are percent-encoded anyway. Fixes #5097 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 18:09:11 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2658