mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 01:10:09 +03:00
[PR #2257] [MERGED] Increase length limit for email token generation #3279
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
main← Head:email-token📝 Commits (1)
7d552dbIncrease 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 wouldprobably be overkill.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.