[PR #2257] [MERGED] Increase length limit for email token generation #3279

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2257
Author: @jjlin
Created: 1/24/2022
Status: Merged
Merged: 1/29/2022
Merged by: @dani-garcia

Base: mainHead: email-token


📝 Commits (1)

  • 7d552db Increase length limit for email token generation

📊 Changes

5 files changed (+15 additions, -43 deletions)

View changed files

📝 .env.template (+1 -1)
📝 src/api/core/accounts.rs (+1 -1)
📝 src/api/core/two_factor/email.rs (+2 -16)
📝 src/config.rs (+2 -6)
📝 src/crypto.rs (+9 -19)

📄 Description

The current limit of 19 is an artifact of the implementation, which can be
easily rewritten in terms of a more general string generation function.
The new limit is 255 (max value of a u8); using a larger type would
probably be overkill.


🔄 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/2257 **Author:** [@jjlin](https://github.com/jjlin) **Created:** 1/24/2022 **Status:** ✅ Merged **Merged:** 1/29/2022 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `email-token` --- ### 📝 Commits (1) - [`7d552db`](https://github.com/dani-garcia/vaultwarden/commit/7d552dbdc8d8d7536ac7f7d3a8c8ad9a7d316f83) Increase length limit for email token generation ### 📊 Changes **5 files changed** (+15 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `.env.template` (+1 -1) 📝 `src/api/core/accounts.rs` (+1 -1) 📝 `src/api/core/two_factor/email.rs` (+2 -16) 📝 `src/config.rs` (+2 -6) 📝 `src/crypto.rs` (+9 -19) </details> ### 📄 Description The current limit of 19 is an artifact of the implementation, which can be easily rewritten in terms of a more general string generation function. The new limit is 255 (max value of a `u8`); using a larger type would probably be overkill. --- <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:20:25 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3279