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:
parent
b4b2701905
commit
b428481ac0
4 changed files with 27 additions and 11 deletions
|
@ -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."))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue