diff options
author | Mathijs van Veluw <[email protected]> | 2024-10-13 20:32:15 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-13 20:32:15 +0200 |
commit | 65629a99f07ec399cd574a4f20b6e73c2ba8f2a3 (patch) | |
tree | 9cdd6633ae3505726604a09dc485fbc0465e30ae /src | |
parent | 49c5dec9b6c1899f8fc5ad3cff0ddc09cecf71c5 (diff) | |
download | vaultwarden-65629a99f07ec399cd574a4f20b6e73c2ba8f2a3.tar.gz vaultwarden-65629a99f07ec399cd574a4f20b6e73c2ba8f2a3.zip |
Fix field type to actually be hidden (#5082)
In an oversight i forgot to set the type to a hidden type if converting the int was not possible.
This fixes that.
Signed-off-by: BlackDex <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/db/models/cipher.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 9dc9cba5..06aa69c5 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -186,7 +186,7 @@ impl Cipher { match f.data.get("type") { Some(t) if t.is_number() => {} Some(t) if t.is_string() => { - let type_num = &t.as_str().unwrap_or("0").parse::<u8>().unwrap_or(1); + let type_num = &t.as_str().unwrap_or("1").parse::<u8>().unwrap_or(1); f.data["type"] = json!(type_num); } _ => { |