diff options
author | Mathijs van Veluw <[email protected]> | 2024-07-24 21:49:01 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-24 21:49:01 +0200 |
commit | b428481ac0047df695fb626d6c28f11ec7535cec (patch) | |
tree | e264d6ba754077cd9618b4e97a6a1d643c85c652 /src/config.rs | |
parent | b4b2701905752f90080dd46ba10a90c5c584a38e (diff) | |
download | vaultwarden-b428481ac0047df695fb626d6c28f11ec7535cec.tar.gz vaultwarden-b428481ac0047df695fb626d6c28f11ec7535cec.zip |
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
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index 58e52155..93944131 100644 --- a/src/config.rs +++ b/src/config.rs @@ -618,7 +618,13 @@ make_config! { admin_session_lifetime: i64, true, def, 20; /// Enable groups (BETA!) (Know the risks!) |> Enables groups support for organizations (Currently contains known issues!). - org_groups_enabled: bool, false, def, false; + org_groups_enabled: bool, false, def, false; + + /// Increase note size limit (Know the risks!) |> Sets the secure note size limit to 100_000 instead of the default 10_000. + /// WARNING: This could cause issues with clients. Also exports will not work on Bitwarden servers! + increase_note_size_limit: bool, true, def, false; + /// Generated max_note_size value to prevent if..else matching during every check + _max_note_size: usize, false, gen, |c| if c.increase_note_size_limit {100_000} else {10_000}; }, /// Yubikey settings @@ -1001,6 +1007,11 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { _ => {} } } + + if cfg.increase_note_size_limit { + println!("[WARNING] Secure Note size limit is increased to 100_000!"); + println!("[WARNING] This could cause issues with clients. Also exports will not work on Bitwarden servers!."); + } Ok(()) } |