Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-22 05:10:29 +01:00
Fix SSN field in Identity cipher not loading correctly
It needs to be all uppercase otherwise the web vault doesn't load it
Dieser Commit ist enthalten in:
Ursprung
3b09750b76
Commit
57850a3379
1 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen
|
@ -209,7 +209,8 @@ fn update_cipher_from_data(cipher: &mut Cipher, data: CipherData, headers: &Head
|
|||
fn copy_values(from: &Value, to: &mut Value) {
|
||||
if let Some(map) = from.as_object() {
|
||||
for (key, val) in map {
|
||||
copy_values(val, &mut to[util::upcase_first(key)]);
|
||||
let processed_key = _process_key(key);
|
||||
copy_values(val, &mut to[processed_key]);
|
||||
}
|
||||
} else if let Some(array) = from.as_array() {
|
||||
// Initialize array with null values
|
||||
|
@ -223,6 +224,13 @@ fn copy_values(from: &Value, to: &mut Value) {
|
|||
}
|
||||
}
|
||||
|
||||
fn _process_key(key: &str) -> String {
|
||||
match key.to_lowercase().as_ref() {
|
||||
"ssn" => "SSN".into(),
|
||||
key => util::upcase_first(key)
|
||||
}
|
||||
}
|
||||
|
||||
use super::folders::FolderData;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
Laden …
In neuem Issue referenzieren