mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-11-10 06:14:16 +00:00
Updated dependencies and fixed errors
This commit is contained in:
parent
a01fee0b9f
commit
928e2424c0
4 changed files with 365 additions and 136 deletions
482
Cargo.lock
generated
482
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -13,7 +13,7 @@ rocket_contrib = "0.3.16"
|
||||||
reqwest = "0.8.8"
|
reqwest = "0.8.8"
|
||||||
|
|
||||||
# multipart/form-data support
|
# multipart/form-data support
|
||||||
multipart = "0.15.2"
|
multipart = "0.15.3"
|
||||||
|
|
||||||
# WebSockets library
|
# WebSockets library
|
||||||
ws = "0.7.8"
|
ws = "0.7.8"
|
||||||
|
@ -25,9 +25,9 @@ rmpv = "0.4.0"
|
||||||
chashmap = "2.2.0"
|
chashmap = "2.2.0"
|
||||||
|
|
||||||
# A generic serialization/deserialization framework
|
# A generic serialization/deserialization framework
|
||||||
serde = "1.0.75"
|
serde = "1.0.77"
|
||||||
serde_derive = "1.0.75"
|
serde_derive = "1.0.77"
|
||||||
serde_json = "1.0.26"
|
serde_json = "1.0.27"
|
||||||
|
|
||||||
# A safe, extensible ORM and Query builder
|
# A safe, extensible ORM and Query builder
|
||||||
diesel = { version = "1.3.2", features = ["sqlite", "chrono", "r2d2"] }
|
diesel = { version = "1.3.2", features = ["sqlite", "chrono", "r2d2"] }
|
||||||
|
@ -40,7 +40,7 @@ libsqlite3-sys = { version = "0.9.3", features = ["bundled"] }
|
||||||
ring = { version = "= 0.11.0", features = ["rsa_signing"] }
|
ring = { version = "= 0.11.0", features = ["rsa_signing"] }
|
||||||
|
|
||||||
# UUID generation
|
# UUID generation
|
||||||
uuid = { version = "0.6.5", features = ["v4"] }
|
uuid = { version = "0.7.0", features = ["v4"] }
|
||||||
|
|
||||||
# Date and time library for Rust
|
# Date and time library for Rust
|
||||||
chrono = "0.4.6"
|
chrono = "0.4.6"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2018-08-24
|
nightly-2018-09-12
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
use rocket::State;
|
||||||
use rocket_contrib::{Json, Value};
|
use rocket_contrib::{Json, Value};
|
||||||
use CONFIG;
|
use CONFIG;
|
||||||
use db::DbConn;
|
use db::DbConn;
|
||||||
use db::models::*;
|
use db::models::*;
|
||||||
|
|
||||||
use api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase};
|
use api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase, WebSocketUsers, UpdateType};
|
||||||
use auth::{Headers, AdminHeaders, OwnerHeaders};
|
use auth::{Headers, AdminHeaders, OwnerHeaders};
|
||||||
|
|
||||||
use serde::{Deserialize, Deserializer};
|
use serde::{Deserialize, Deserializer};
|
||||||
|
@ -601,7 +602,7 @@ struct RelationsData {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[post("/ciphers/import-organization?<query>", data = "<data>")]
|
#[post("/ciphers/import-organization?<query>", data = "<data>")]
|
||||||
fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Headers, conn: DbConn) -> EmptyResult {
|
fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Headers, conn: DbConn, ws: State<WebSocketUsers>) -> EmptyResult {
|
||||||
let data: ImportData = data.into_inner().data;
|
let data: ImportData = data.into_inner().data;
|
||||||
let org_id = query.organizationId;
|
let org_id = query.organizationId;
|
||||||
|
|
||||||
|
@ -630,7 +631,7 @@ fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Head
|
||||||
// Read and create the ciphers
|
// Read and create the ciphers
|
||||||
let ciphers: Vec<_> = data.Ciphers.into_iter().map(|cipher_data| {
|
let ciphers: Vec<_> = data.Ciphers.into_iter().map(|cipher_data| {
|
||||||
let mut cipher = Cipher::new(cipher_data.Type, cipher_data.Name.clone());
|
let mut cipher = Cipher::new(cipher_data.Type, cipher_data.Name.clone());
|
||||||
update_cipher_from_data(&mut cipher, cipher_data, &headers, false, &conn).ok();
|
update_cipher_from_data(&mut cipher, cipher_data, &headers, false, &conn, &ws, UpdateType::SyncCipherCreate).ok();
|
||||||
cipher
|
cipher
|
||||||
}).collect();
|
}).collect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue