1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-07-21 11:38:20 +00:00

Allow to increase the note size to 100_000 (#4772)

This PR adds a config option to allow the note size to increase to 100_000, instead of the default 10_000.
Since this might cause issues with the clients (in the future), and will cause issues with importing into a Bitwarden server, i added warnings regarding this.

Closes #3168
This commit is contained in:
Mathijs van Veluw 2024-07-24 21:49:01 +02:00 committed by GitHub
commit b428481ac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 11 deletions

View file

@ -377,8 +377,9 @@ pub async fn update_cipher_from_data(
}
if let Some(note) = &data.notes {
if note.len() > 10_000 {
err!("The field Notes exceeds the maximum encrypted value length of 10000 characters.")
let max_note_size = CONFIG._max_note_size();
if note.len() > max_note_size {
err!(format!("The field Notes exceeds the maximum encrypted value length of {max_note_size} characters."))
}
}