1
0
Fork 0

Update dependencies and remove unwraps from Cipher::to_json

Dieser Commit ist enthalten in:
Daniel García 2019-06-14 22:51:50 +02:00
Ursprung fff72889f6
Commit 76f38621de
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FC8A7D14C3CD543A
4 geänderte Dateien mit 198 neuen und 170 gelöschten Zeilen

337
Cargo.lock generiert

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -25,7 +25,7 @@ rocket = { version = "0.5.0-dev", features = ["tls"], default-features = false }
rocket_contrib = "0.5.0-dev" rocket_contrib = "0.5.0-dev"
# HTTP client # HTTP client
reqwest = "0.9.17" reqwest = "0.9.18"
# multipart/form-data support # multipart/form-data support
multipart = { version = "0.16.1", features = ["server"], default-features = false } multipart = { version = "0.16.1", features = ["server"], default-features = false }
@ -86,15 +86,15 @@ dotenv = { version = "0.14.1", default-features = false }
lazy_static = "1.3.0" lazy_static = "1.3.0"
# More derives # More derives
derive_more = "0.14.1" derive_more = "0.15.0"
# Numerical libraries # Numerical libraries
num-traits = "0.2.8" num-traits = "0.2.8"
num-derive = "0.2.5" num-derive = "0.2.5"
# Email libraries # Email libraries
lettre = "0.9.1" lettre = "0.9.2"
lettre_email = "0.9.1" lettre_email = "0.9.2"
native-tls = "0.2.3" native-tls = "0.2.3"
quoted_printable = "0.4.1" quoted_printable = "0.4.1"
@ -103,7 +103,7 @@ handlebars = "1.1.0"
# For favicon extraction from main website # For favicon extraction from main website
soup = "0.4.1" soup = "0.4.1"
regex = "1.1.6" regex = "1.1.7"
[patch.crates-io] [patch.crates-io]
# Add support for Timestamp type # Add support for Timestamp type
@ -112,7 +112,3 @@ rmp = { git = 'https://github.com/dani-garcia/msgpack-rust' }
# Use newest ring # Use newest ring
rocket = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'dbcb0a75b9556763ac3ab708f40c8f8ed75f1a1e' } rocket = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'dbcb0a75b9556763ac3ab708f40c8f8ed75f1a1e' }
rocket_contrib = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'dbcb0a75b9556763ac3ab708f40c8f8ed75f1a1e' } rocket_contrib = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'dbcb0a75b9556763ac3ab708f40c8f8ed75f1a1e' }
# Fix lettre on newer nightlies
lettre = { version = "0.9", git = "https://github.com/lettre/lettre", rev= '0ead3cde09a02918e3976aa442329fe247f05c55' }
lettre_email = { version = "0.9", git = "https://github.com/lettre/lettre", rev= '0ead3cde09a02918e3976aa442329fe247f05c55' }

Datei anzeigen

@ -1 +1 @@
nightly-2019-06-01 nightly-2019-06-14

Datei anzeigen

@ -77,19 +77,10 @@ impl Cipher {
let attachments = Attachment::find_by_cipher(&self.uuid, conn); let attachments = Attachment::find_by_cipher(&self.uuid, conn);
let attachments_json: Vec<Value> = attachments.iter().map(|c| c.to_json(host)).collect(); let attachments_json: Vec<Value> = attachments.iter().map(|c| c.to_json(host)).collect();
let fields_json: Value = if let Some(ref fields) = self.fields { let fields_json = self.fields.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
serde_json::from_str(fields).unwrap() let password_history_json = self.password_history.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
} else {
Value::Null
};
let password_history_json: Value = if let Some(ref password_history) = self.password_history { let mut data_json: Value = serde_json::from_str(&self.data).unwrap_or(Value::Null);
serde_json::from_str(password_history).unwrap()
} else {
Value::Null
};
let mut data_json: Value = serde_json::from_str(&self.data).unwrap();
// TODO: ******* Backwards compat start ********** // TODO: ******* Backwards compat start **********
// To remove backwards compatibility, just remove this entire section // To remove backwards compatibility, just remove this entire section