[PR #4916] [MERGED] Actually use Device Type for mails #27093

Closed
opened 2026-06-15 14:25:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4916
Author: @dfunkt
Created: 9/3/2024
Status: Merged
Merged: 9/18/2024
Merged by: @dani-garcia

Base: mainHead: email-device-type


📝 Commits (1)

  • aff302a Actually use Device Type for mails

📊 Changes

17 files changed (+57 additions, -21 deletions)

View changed files

migrations/mysql/2024-09-04-091351_use_device_type_for_mails/down.sql (+1 -0)
migrations/mysql/2024-09-04-091351_use_device_type_for_mails/up.sql (+1 -0)
migrations/postgresql/2024-09-04-091351_use_device_type_for_mails/down.sql (+1 -0)
migrations/postgresql/2024-09-04-091351_use_device_type_for_mails/up.sql (+1 -0)
migrations/sqlite/2024-09-04-091351_use_device_type_for_mails/down.sql (+1 -0)
migrations/sqlite/2024-09-04-091351_use_device_type_for_mails/up.sql (+1 -0)
📝 src/api/core/two_factor/mod.rs (+8 -2)
📝 src/api/identity.rs (+3 -3)
📝 src/db/models/two_factor_incomplete.rs (+3 -0)
📝 src/db/schemas/mysql/schema.rs (+1 -0)
📝 src/db/schemas/postgresql/schema.rs (+1 -0)
📝 src/db/schemas/sqlite/schema.rs (+1 -0)
📝 src/mail.rs (+13 -7)
📝 src/static/templates/email/incomplete_2fa_login.hbs (+3 -2)
📝 src/static/templates/email/incomplete_2fa_login.html.hbs (+7 -2)
📝 src/static/templates/email/new_device_logged_in.hbs (+4 -3)
📝 src/static/templates/email/new_device_logged_in.html.hbs (+7 -2)

📄 Description

  • match Bitwarden behaviour
  • remove upcase_first, no longer needed and it would also interfere with device types like iOS, macOS

Examples:

Chrome Extension
Before -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Chrome
After -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Chrome Extension

Poco F3 (shows up as M2012K11AG)
Before -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: M2012K11AG
After -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Android


🔄 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/4916 **Author:** [@dfunkt](https://github.com/dfunkt) **Created:** 9/3/2024 **Status:** ✅ Merged **Merged:** 9/18/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `email-device-type` --- ### 📝 Commits (1) - [`aff302a`](https://github.com/dani-garcia/vaultwarden/commit/aff302a8fb770365d42acf59de112f2774f219ab) Actually use Device Type for mails ### 📊 Changes **17 files changed** (+57 additions, -21 deletions) <details> <summary>View changed files</summary> ➕ `migrations/mysql/2024-09-04-091351_use_device_type_for_mails/down.sql` (+1 -0) ➕ `migrations/mysql/2024-09-04-091351_use_device_type_for_mails/up.sql` (+1 -0) ➕ `migrations/postgresql/2024-09-04-091351_use_device_type_for_mails/down.sql` (+1 -0) ➕ `migrations/postgresql/2024-09-04-091351_use_device_type_for_mails/up.sql` (+1 -0) ➕ `migrations/sqlite/2024-09-04-091351_use_device_type_for_mails/down.sql` (+1 -0) ➕ `migrations/sqlite/2024-09-04-091351_use_device_type_for_mails/up.sql` (+1 -0) 📝 `src/api/core/two_factor/mod.rs` (+8 -2) 📝 `src/api/identity.rs` (+3 -3) 📝 `src/db/models/two_factor_incomplete.rs` (+3 -0) 📝 `src/db/schemas/mysql/schema.rs` (+1 -0) 📝 `src/db/schemas/postgresql/schema.rs` (+1 -0) 📝 `src/db/schemas/sqlite/schema.rs` (+1 -0) 📝 `src/mail.rs` (+13 -7) 📝 `src/static/templates/email/incomplete_2fa_login.hbs` (+3 -2) 📝 `src/static/templates/email/incomplete_2fa_login.html.hbs` (+7 -2) 📝 `src/static/templates/email/new_device_logged_in.hbs` (+4 -3) 📝 `src/static/templates/email/new_device_logged_in.html.hbs` (+7 -2) </details> ### 📄 Description - match Bitwarden behaviour - remove upcase_first, no longer needed and it would also interfere with device types like iOS, macOS Examples: Chrome Extension Before -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Chrome After -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Chrome Extension Poco F3 (shows up as M2012K11AG) Before -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: M2012K11AG After -> New Device Logged In From/Incomplete Two-Step Login From/Device Type: Android --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-15 14:25:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#27093