summaryrefslogtreecommitdiff
path: root/src/db/models/cipher.rs
diff options
context:
space:
mode:
authorMathijs van Veluw <[email protected]>2024-10-13 20:32:15 +0200
committerGitHub <[email protected]>2024-10-13 20:32:15 +0200
commit65629a99f07ec399cd574a4f20b6e73c2ba8f2a3 (patch)
tree9cdd6633ae3505726604a09dc485fbc0465e30ae /src/db/models/cipher.rs
parent49c5dec9b6c1899f8fc5ad3cff0ddc09cecf71c5 (diff)
downloadvaultwarden-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/db/models/cipher.rs')
-rw-r--r--src/db/models/cipher.rs2
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);
}
_ => {