From c67337010338db793fd0e1418d1235d4ecf65f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 10 Oct 2018 20:40:39 +0200 Subject: [PATCH 01/24] Updated bw_rs to Rocket version 0.4-rc1 --- Cargo.lock | 879 +++++++++++++------------ Cargo.toml | 30 +- libs/jsonwebtoken/Cargo.toml | 20 - libs/jsonwebtoken/LICENSE | 21 - libs/jsonwebtoken/src/crypto.rs | 120 ---- libs/jsonwebtoken/src/errors.rs | 68 -- libs/jsonwebtoken/src/header.rs | 64 -- libs/jsonwebtoken/src/lib.rs | 142 ---- libs/jsonwebtoken/src/serialization.rs | 42 -- libs/jsonwebtoken/src/validation.rs | 377 ----------- rust-toolchain | 2 +- src/api/core/accounts.rs | 25 +- src/api/core/ciphers.rs | 79 ++- src/api/core/folders.rs | 17 +- src/api/core/mod.rs | 134 +--- src/api/core/organizations.rs | 59 +- src/api/core/two_factor.rs | 22 +- src/api/identity.rs | 21 +- src/api/mod.rs | 7 +- src/api/notifications.rs | 2 +- src/api/web.rs | 3 +- src/auth.rs | 8 +- src/db/models/attachment.rs | 4 +- src/db/models/cipher.rs | 16 +- src/db/models/collection.rs | 4 +- src/db/models/folder.rs | 4 +- src/db/models/organization.rs | 12 +- src/db/models/two_factor.rs | 6 +- src/db/models/user.rs | 6 +- src/main.rs | 5 +- src/util.rs | 2 +- 31 files changed, 716 insertions(+), 1485 deletions(-) delete mode 100644 libs/jsonwebtoken/Cargo.toml delete mode 100644 libs/jsonwebtoken/LICENSE delete mode 100644 libs/jsonwebtoken/src/crypto.rs delete mode 100644 libs/jsonwebtoken/src/errors.rs delete mode 100644 libs/jsonwebtoken/src/header.rs delete mode 100644 libs/jsonwebtoken/src/lib.rs delete mode 100644 libs/jsonwebtoken/src/serialization.rs delete mode 100644 libs/jsonwebtoken/src/validation.rs diff --git a/Cargo.lock b/Cargo.lock index 0d29f263..aadf3de6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,10 +5,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -40,7 +40,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -55,32 +55,20 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "base64" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "base64" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bitflags" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "1.0.4" @@ -90,35 +78,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "bitwarden_rs" version = "1.0.0" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "chashmap 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonwebtoken 4.0.1", + "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "multipart 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "oath 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_codegen 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_contrib 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", - "u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=193de35093a44)", + "rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_contrib 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=75b9fa5afb4c5)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ws 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -126,9 +113,9 @@ name = "buf_redux" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slice-deque 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "slice-deque 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -148,7 +135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.2.6" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -156,7 +143,7 @@ name = "bytes" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -167,7 +154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -209,11 +196,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cookie" -version = "0.9.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -243,15 +230,6 @@ dependencies = [ "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-deque" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam-deque" version = "0.6.1" @@ -261,41 +239,19 @@ dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-epoch" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam-epoch" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-utils" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam-utils" version = "0.5.0" @@ -315,12 +271,41 @@ name = "data-encoding" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "devise" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "devise_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "devise_codegen" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "devise_core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "diesel" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "diesel_derives 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -368,7 +353,7 @@ name = "dotenv" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -451,35 +436,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "failure" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -495,6 +475,16 @@ dependencies = [ "ascii_utils 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "filetime" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fnv" version = "1.0.6" @@ -513,6 +503,24 @@ name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fsevent" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fsevent-sys" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -529,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -537,15 +545,10 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "gcc" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "generic-array" version = "0.7.3" @@ -562,19 +565,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "h2" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -613,10 +616,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.10.13" +version = "0.10.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -631,37 +634,39 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.11" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-sync-rustls" -version = "0.1.0" +version = "0.3.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -670,10 +675,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.11 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -688,9 +693,31 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "inotify" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "inotify-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "iovec" version = "0.1.2" @@ -705,7 +732,7 @@ name = "iron" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)", "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -720,7 +747,7 @@ name = "isatty" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -733,16 +760,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonwebtoken" -version = "4.0.1" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -759,11 +786,6 @@ name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.1.0" @@ -784,16 +806,16 @@ source = "git+https://github.com/lettre/lettre?rev=c988b1760ad81#c988b1760ad8179 dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "fast_chemail 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "nom 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -803,10 +825,10 @@ source = "git+https://github.com/lettre/lettre?rev=c988b1760ad81#c988b1760ad8179 dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "email 0.0.19 (git+https://github.com/lettre/rust-email)", - "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", - "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -822,7 +844,7 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -850,20 +872,20 @@ name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mach" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", @@ -876,10 +898,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -917,10 +939,10 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.9" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -939,7 +961,7 @@ name = "mime_guess" version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -956,7 +978,7 @@ dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -969,7 +991,7 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1007,9 +1029,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "buf_redux 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)", "nickel 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1032,14 +1054,15 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.12 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1051,7 +1074,7 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1062,7 +1085,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1082,10 +1105,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "notify" +version = "4.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1094,9 +1135,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1142,15 +1183,15 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.12" +version = "0.10.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1160,7 +1201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.36" +version = "0.9.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1169,11 +1210,6 @@ dependencies = [ "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ordermap" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "owning_ref" version = "0.2.4" @@ -1231,14 +1267,20 @@ dependencies = [ [[package]] name = "pear" -version = "0.0.20" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pear_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "pear_codegen" -version = "0.0.20" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1306,7 +1348,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1332,10 +1374,10 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1344,7 +1386,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1383,25 +1425,6 @@ name = "rand_core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "rayon" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "redox_syscall" version = "0.1.40" @@ -1412,11 +1435,11 @@ name = "regex" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1424,11 +1447,11 @@ name = "regex" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1436,7 +1459,7 @@ name = "regex-syntax" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1444,7 +1467,7 @@ name = "regex-syntax" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1457,40 +1480,39 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ring" -version = "0.11.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1498,7 +1520,7 @@ name = "rmp" version = "0.8.7" source = "git+https://github.com/dani-garcia/msgpack-rust#3ba7cf4f9b33d78b1fca145c0d4b5600d797387e" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1513,50 +1535,65 @@ dependencies = [ [[package]] name = "rocket" -version = "0.3.17" +version = "0.4.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-sync-rustls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "pear 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)", - "pear_codegen 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pear 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_codegen 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_codegen" -version = "0.3.17" +version = "0.4.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "devise 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_contrib" -version = "0.3.17" +version = "0.4.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rocket_http" +version = "0.4.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-sync-rustls 0.3.0-rc.4 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pear 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1584,15 +1621,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.9.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1610,6 +1647,14 @@ name = "safemem" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "same-file" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "schannel" version = "0.1.14" @@ -1632,6 +1677,15 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "sct" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "security-framework" version = "0.2.1" @@ -1667,27 +1721,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1697,7 +1751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1742,11 +1796,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "slice-deque" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "mach 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1795,21 +1849,11 @@ dependencies = [ [[package]] name = "syn" -version = "0.14.9" +version = "0.15.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1823,12 +1867,12 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1846,7 +1890,7 @@ name = "tempfile" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1891,7 +1935,7 @@ dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1901,19 +1945,19 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1922,8 +1966,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1931,7 +1975,7 @@ name = "tokio-current-thread" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1940,27 +1984,27 @@ name = "tokio-executor" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-fs" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1969,15 +2013,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1986,22 +2030,22 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2013,7 +2057,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2024,27 +2068,27 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2053,7 +2097,7 @@ name = "toml" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2071,7 +2115,7 @@ name = "twoway" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2095,24 +2139,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "u2f" version = "0.1.2" -source = "git+https://github.com/wisespace-io/u2f-rs?rev=193de35093a44#193de35093a44576edba6cc94d9b54f2a1cbdcd1" +source = "git+https://github.com/wisespace-io/u2f-rs?rev=75b9fa5afb4c5#75b9fa5afb4c5230255136b6689df2a359f41472" dependencies = [ - "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ucd-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2125,7 +2169,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2172,7 +2216,7 @@ dependencies = [ [[package]] name = "untrusted" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2187,7 +2231,7 @@ dependencies = [ [[package]] name = "utf8-ranges" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2213,42 +2257,42 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "want" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webpki" -version = "0.14.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "webpki" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webpki-roots" -version = "0.11.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2275,6 +2319,14 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2290,13 +2342,13 @@ dependencies = [ [[package]] name = "ws" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2321,42 +2373,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" +"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum ascii 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "97be891acc47ca214468e09425d02cef3af2c94d0d82081cd02061f996802f14" "checksum ascii_utils 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" -"checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" -"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum buf_redux 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20c6687a26c9ce967594b78038c06139a0d3a5b3005d16572284d543924a01aa" "checksum bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "40e38929add23cdf8a366df9b0e088953150724bcbe5fc330b0d8eb3b328eec8" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byte-tools 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0919189ba800c7ffe8778278116b7e0de3905ab81c72abb69c85cbfef7991279" -"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" +"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" -"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum chashmap 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47e651a8c1eb0cbbaa730f705e2531e75276c6f2bbe2eb12662cfd305213dff8" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum chunked_transfer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" -"checksum cookie 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "477eb650753e319be2ae77ec368a58c638f9f0c4d941c39bad95e950fb1d1d0d" +"checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" -"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1" -"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9" -"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" "checksum crypto-mac 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dba62c86c26dcba13c278afcaac0c7452486fe604a2668a0dfa4e0edc98d8a9e" "checksum data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67df0571a74bf0d97fb8b2ed22abdd9a48475c96bd327db968b7d9cace99655e" +"checksum devise 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8e7e0601aeb557a7a8f6a4f87d29c8cc0feb2c41d15f5d65900723dabf083b" +"checksum devise_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c88254efd3c2dfbeaf598d0ea35a54ef457ca04e31d214420d086ac9236b436" +"checksum devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e33669c00593713cedf755f69723aa0731de7bc1f552903d6df98d6c4f91bcca" "checksum diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "164080ac16a4d1d80a50f0a623e4ddef41cb2779eee85bcc76907d340dfc98cc" "checksum diesel_derives 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03bcaf77491f53e400d5ee3bdd57142ea4e1c47fe9217b3361ff9a76ca0e3d37" "checksum diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b42c35d1ce9e8d57a3e7001b4127f2bc1b073a89708bb7019f5be27c991c28" @@ -2372,40 +2423,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" -"checksum encoding_rs 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "cc9945e460ad969220c1061b9574fb02ed097c6f0704ce2f3e336cb443c40c73" -"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7efb22686e4a466b1ec1a15c2898f91fa9cb340452496dca654032de20ff95b9" -"checksum failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "946d0e98a50d9831f5d589038d2ca7f8f455b1c21028c0db0e84116a12696426" +"checksum encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)" = "065f4d0c826fdaef059ac45487169d918558e3cf86c9d89f6e81cf52369126e5" +"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" +"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fast_chemail 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "115e1df89e36c3300a0f88b8b81c41ad24f7bf2b291912e405824d98a553704b" +"checksum filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da4b9849e77b13195302c174324b5ba73eec9b236b24c221a61000daefb95c5f" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" +"checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "0c84b40c7e2de99ffd70602db314a7a8c26b2b3d830e6f7f7a142a8860ab3ca4" +"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum generic-array 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe043cf9b85297937897087de81f590361686e1ac2d4d471b45435de5dfb6a6" "checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c" +"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum hmac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb5aa9647ba4711e9d6968dc1c810cd23989ed435443ca962e1bf6d8b8b83ff" "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" "checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" -"checksum hyper 0.12.11 (registry+https://github.com/rust-lang/crates.io-index)" = "78d50abbd1790e0f4c74cb1d4a2211b439bac661d54107ad5564c55e77906762" -"checksum hyper-sync-rustls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c6df6f419a9f116cc93b5f39a5ded1161e088a2c8424c8fcd1d4049193424a4" +"checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" +"checksum hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)" = "95ffee0d1d30de4313fdaaa485891ce924991d45bbc18adfc8ac5b1639e62fbb" +"checksum hyper-sync-rustls 0.3.0-rc.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d1a443a90413a118ac6739e024f6a5180aa3b3f43f7de65f9d388a961cff19b" "checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08173ba1e906efb6538785a8844dd496f5d34f0a2d88038e95195172fc667220" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" +"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" +"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8e17268922834707e1c29e8badbf9c712c9c43378e1b6a3388946baff10be2" "checksum isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e31a8281fc93ec9693494da65fbf28c0c2aa60a2eaec25dc58e2f31952e95edc" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d438ea707d465c230305963b67f8357a1d56fcfad9434797d7cb1c46c2e41df" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" @@ -2415,15 +2469,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d3711dfd91a1081d2458ad2d06ea30a8755256e74038be2ad927d94e1c955ca8" "checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" -"checksum mach 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "977262a11cfd76b94da10b8898cea6e9ac391301ab74741e6da6bee13d7df46d" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" +"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum migrations_internals 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8cf7c8c4f83fa9f47440c0b4af99973502de55e6e7b875f693bd263e03f93e7e" "checksum migrations_macros 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79f12499ef7353bdeca2d081bc61edd8351dac09a33af845952009b5a3d68c1a" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -"checksum mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4b082692d3f6cf41b453af73839ce3dfc212c4411cbb2441dff80a716e38bd79" +"checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" "checksum mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2d4c0961143b8efdcfa29c3ae63281601b446a4a668165454b6c90f8024954c5" "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" @@ -2433,29 +2487,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" "checksum multipart 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bd50d71866514b14d2ca09823d81390d92daa40bc835f83a908c52ab0a802e" "checksum mustache 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb004e419334fc9172d0a5ff91c0770bdd6239091b0b343eb5926101f0a7d13" -"checksum native-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8b0a7bd714e83db15676d31caf968ad7318e9cc35f93c85a90231c8f22867549" +"checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nickel 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "22b40e35b9f46a076dcbd8193125cea0e4130b1c015f68655038010f3e826e04" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum nom 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "898696750eb5c3ce5eb5afbfbe46e7f7c4e1936e19d3e97be4b7937da7b6d114" +"checksum nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a" +"checksum notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "873ecfd8c174964ae30f401329d140142312c8e5590719cf1199d5f1717d8078" "checksum num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8af1847c907c2f04d7bfd572fb25bbb4385c637fe5be163cf2f8c5d778fe1e7d" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum oath 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6405dc6afe8219020d535f9ad888a12b191bbc8ce1c55f7ee663bde5be80ca" -"checksum openssl 0.10.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5e2e79eede055813a3ac52fb3915caf8e1c9da2dec1587871aec9f6f7b48508d" +"checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)" = "409d77eeb492a1aebd6eb322b2ee72ff7c7496b4434d98b3bf8be038755de65e" -"checksum ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b81cf3b8cb96aa0e73bbedfcdc9708d09fec2854ba8d474be4e6f666d7379e8b" +"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" "checksum owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" -"checksum pear 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "353fe88ff7a430c0f39ca4ec19e1f8fa0062f696370e8df3080ac40139a63301" -"checksum pear_codegen 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0f3ef1db2d855e0c00fad8e5a8216a70df6d9c1c7f7a7ac9f1cf50675142b7" +"checksum pear 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6fafc1ff6226da94e62a0543e823b9787816330e7362055ff7881a29a4ed7392" +"checksum pear_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79675c685b21a3adc17113410122ee8e9ad7551d52fca2abd175aefb1dfadd79" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "cec29da322b242f4c3098852c77a0ca261c9c01b806cae85a5572a1eb94db9a6" "checksum phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "7d187f00cd98d5afbcd8898f6cf181743a449162aeb329dcd2f3849009e605ad" @@ -2464,66 +2518,66 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" -"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" +"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" -"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" +"checksum quote 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "63b5829244f52738cfee93b3a165c1911388675be000c888d2fae620dee8fa5b" "checksum r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f9078ca6a8a5568ed142083bb2f7dc9295b69d16f867ddcc9849e51b17d8db46" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" -"checksum rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a77c51c07654ddd93f6cb543c7a849863b03abc7e82591afda6dc8ad4ac3ac4a" -"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" "checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum reqwest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1d68c7bf0b1dc3860b80c6d31d05808bf54cdc1bfc70a4680893791becd083ae" -"checksum ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2a6dc7fc06a05e6de183c5b97058582e9da2de0c136eafe49609769c507724" +"checksum reqwest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "00a5870d8edc74fc6e1eb58edbd2815d2243e1a2255d6bf9c82a7a875901b5db" +"checksum ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe642b9dd1ba0038d78c4a3999d1ee56178b4d415c1e1fbaba83b06dce012f0" "checksum rmp 0.8.7 (git+https://github.com/dani-garcia/msgpack-rust)" = "" "checksum rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29af0205707de955a396a1d3c657677c65f791ebabb63c0596c0b2fec0bf6325" -"checksum rocket 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "a61d746c68f1d357f6e011985570474c4af368aa81900320074098d34ed0c64e" -"checksum rocket_codegen 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7873d65adfa3e440ac373a28240341853da170913aad7e4207c0198389e5d0e9" -"checksum rocket_contrib 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2348e3b2458e173203f1e51f3b2e00495a092b70bd9506d2ce2ac64e129d14" +"checksum rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71f9970125ea965ae6e468a5bb878f47762aff210596e4cfc2d4ee9af2365b0f" +"checksum rocket_codegen 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a9adbb359e17dabd05d97aa05a328817a20db5ba6b694cd51bba2900b262691" +"checksum rocket_contrib 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "38cce3e4f0de0b950604c2a5cda4b3d74a7f17c62937cee54f4996b36c2d31a5" +"checksum rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2201c854709fd6f8cc7dca9bd7ebbddb10f27e1cdda191f932546c3dcd98d4a6" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17727f4b991294da2c84d75a43c003151ff58072212768800f66c56ee46dca43" +"checksum rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7891791343c75b73ed9a18cadcafd8c8563d11a88ebe2d87f5b8a3182654d9" "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" +"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" "checksum scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a2ff3fc5223829be817806c6441279c676e454cc7da608faf03b0ccc09d3889" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb8f61f9e6eadd062a71c380043d28036304a4706b3c4dd001ff3387ed00745a" "checksum security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "697d3f3c23a618272ead9e1fb259c1411102b31c6af8b93f1d64cca9c3b0e8e0" "checksum security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab01dfbe5756785b5b4d46e0289e5a18071dfa9a7c2b24213ea00b9ef9b665bf" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" -"checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe" -"checksum serde_json 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "bb47a3d5c84320222f66d7db21157c4a7407755de41798f9b4c1c40593397b1a" +"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" +"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" +"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" "checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" "checksum sha-1 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8347606816471548cd60f0abd5ef0d513a81f5202dbdab9c09f17a15b5248484" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "84920f9ac881e94e33ec89e1b3dcd36040523a308a92548e01217ce35d8cf6a8" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum slice-deque 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "79e5bb98247a0eb0cfdedb7e792962ec71ac1003033f70558bd9961f8912e487" +"checksum slice-deque 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9114aa87a7c0ce55425e175d553fa0bef683c7bb2add185a878a2ff8643529" "checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" -"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -"checksum syn 0.15.8 (registry+https://github.com/rust-lang/crates.io-index)" = "356d1c5043597c40489e9af2d2498c7fefc33e99b7d75b43be336c8a59b3e45e" +"checksum syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)" = "3391038ebc3e4ab24eb028cb0ef2f2dc4ba0cbf72ee895ed6a6fad730640b5bc" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb9b7550d063ea184027c9b8c20ac167cd36d3e06b3a40bceb9d746dc1a7b7" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" @@ -2534,14 +2588,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" "checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" -"checksum tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5cbe4ca6e71cb0b62a66e4e6f53a8c06a6eefe46cc5f665ad6f274c9906f135" -"checksum tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "8b8a85fffbec3c5ab1ab62324570230dcd37ee5996a7859da5caf7b9d45e3e8c" +"checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" +"checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" "checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" "checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bbd8a8b911301c60cbfaa2a6588fb210e5c1038375b8bdecc47aa09a94c3c05f" +"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" "checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" "checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22e3aa6d1fcc19e635418dc0a30ab5bd65d347973d6f43f1a37bf8d9d1335fc9" +"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" "checksum toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2ecc31b0351ea18b3fe11274b8db6e4d82bce861bbb22e6dbed40417902c65" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" @@ -2549,33 +2603,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=193de35093a44)" = "" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" +"checksum u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=75b9fa5afb4c5)" = "" +"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" -"checksum untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f392d7819dbe58833e26872f5f6f0d68b7bbbe90fc3667e98731c4a15ad9a7ae" +"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" -"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dab5c5526c5caa3d106653401a267fed923e7046f35895ffcb5ca42db64942e6" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum walkdir 2.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0ffb549f212c31e19f3667c55a7f515b983a84aef10fd0a4d1f9c125425115f3" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" -"checksum webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e499345fc4c6b7c79a5b8756d4592c4305510a13512e79efafe00dfbd67bbac6" -"checksum webpki 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "493012e46177f3f4ee9cd58fd0c81ecb77e6d6cc6ebce55989b9c33376fbe5ee" -"checksum webpki-roots 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bfb3f50499f21ad2317f442845e3b5805b007f1e728f59885c99e61b8c181a7" +"checksum webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "17d7967316d8411ca3b01821ee6c332bde138ba4363becdb492f12e514daa17f" +"checksum webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85d1f408918fd590908a70d36b7ac388db2edc221470333e4d6e5b598e44cabf" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" -"checksum ws 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c221321dca56e6a80aa179d562e1fbe6ae116aeaa9205c76fa64e9e3c49dfc" +"checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" diff --git a/Cargo.toml b/Cargo.toml index 736a83ba..237e21ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,18 +5,17 @@ authors = ["Daniel García "] [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. -rocket = { version = "0.3.17", features = ["tls"] } -rocket_codegen = "0.3.17" -rocket_contrib = "0.3.17" +rocket = { version = "0.4.0-rc.1", features = ["tls"] } +rocket_contrib = "0.4.0-rc.1" # HTTP client -reqwest = "0.9.2" +reqwest = "0.9.4" # multipart/form-data support multipart = "0.15.3" # WebSockets library -ws = "0.7.8" +ws = "0.7.9" # MessagePack library rmpv = "0.4.0" @@ -25,9 +24,9 @@ rmpv = "0.4.0" chashmap = "2.2.0" # A generic serialization/deserialization framework -serde = "1.0.79" -serde_derive = "1.0.79" -serde_json = "1.0.31" +serde = "1.0.80" +serde_derive = "1.0.80" +serde_json = "1.0.32" # A safe, extensible ORM and Query builder diesel = { version = "1.3.3", features = ["sqlite", "chrono", "r2d2"] } @@ -37,7 +36,7 @@ diesel_migrations = { version = "1.3.0", features = ["sqlite"] } libsqlite3-sys = { version = "0.9.3", features = ["bundled"] } # Crypto library -ring = { version = "= 0.11.0", features = ["rsa_signing"] } +ring = { version = "0.13.2", features = ["rsa_signing"] } # UUID generation uuid = { version = "0.7.1", features = ["v4"] } @@ -52,7 +51,7 @@ oath = "0.10.2" data-encoding = "2.1.1" # JWT library -jsonwebtoken = "= 4.0.1" +jsonwebtoken = "5.0.1" # U2F library u2f = "0.1.2" @@ -70,17 +69,18 @@ num-derive = "0.2.3" # Email libraries lettre = "0.9.0" lettre_email = "0.9.0" -native-tls = "0.2.1" +native-tls = "0.2.2" # Number encoding library -byteorder = "1.2.6" +byteorder = "1.2.7" [patch.crates-io] - # Make jwt use ring 0.11, to match rocket -jsonwebtoken = { path = "libs/jsonwebtoken" } +# Add support for Timestamp type rmp = { git = 'https://github.com/dani-garcia/msgpack-rust' } + +# Use new native_tls version 0.2 lettre = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' } lettre_email = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' } # Version 0.1.2 from crates.io lacks a commit that fixes a certificate error -u2f = { git = 'https://github.com/wisespace-io/u2f-rs', rev = '193de35093a44' } +u2f = { git = 'https://github.com/wisespace-io/u2f-rs', rev = '75b9fa5afb4c5' } diff --git a/libs/jsonwebtoken/Cargo.toml b/libs/jsonwebtoken/Cargo.toml deleted file mode 100644 index 065098e1..00000000 --- a/libs/jsonwebtoken/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "jsonwebtoken" -version = "4.0.1" -authors = ["Vincent Prouillet "] -license = "MIT" -readme = "README.md" -description = "Create and parse JWT in a strongly typed way." -homepage = "https://github.com/Keats/rust-jwt" -repository = "https://github.com/Keats/rust-jwt" -keywords = ["jwt", "web", "api", "token", "json"] - -[dependencies] -error-chain = { version = "0.11", default-features = false } -serde_json = "1.0" -serde_derive = "1.0" -serde = "1.0" -ring = { version = "0.11.0", features = ["rsa_signing", "dev_urandom_fallback"] } -base64 = "0.9" -untrusted = "0.5" -chrono = "0.4" diff --git a/libs/jsonwebtoken/LICENSE b/libs/jsonwebtoken/LICENSE deleted file mode 100644 index 36272c3f..00000000 --- a/libs/jsonwebtoken/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Vincent Prouillet - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/libs/jsonwebtoken/src/crypto.rs b/libs/jsonwebtoken/src/crypto.rs deleted file mode 100644 index b2516b53..00000000 --- a/libs/jsonwebtoken/src/crypto.rs +++ /dev/null @@ -1,120 +0,0 @@ -use std::sync::Arc; - -use base64; -use ring::{rand, digest, hmac, signature}; -use ring::constant_time::verify_slices_are_equal; -use untrusted; - -use errors::{Result, ErrorKind}; - - -/// The algorithms supported for signing/verifying -#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)] -pub enum Algorithm { - /// HMAC using SHA-256 - HS256, - /// HMAC using SHA-384 - HS384, - /// HMAC using SHA-512 - HS512, - - /// RSASSA-PKCS1-v1_5 using SHA-256 - RS256, - /// RSASSA-PKCS1-v1_5 using SHA-384 - RS384, - /// RSASSA-PKCS1-v1_5 using SHA-512 - RS512, -} - -/// The actual HS signing + encoding -fn sign_hmac(alg: &'static digest::Algorithm, key: &[u8], signing_input: &str) -> Result { - let signing_key = hmac::SigningKey::new(alg, key); - let digest = hmac::sign(&signing_key, signing_input.as_bytes()); - - Ok( - base64::encode_config::(&digest, base64::URL_SAFE_NO_PAD) - ) -} - -/// The actual RSA signing + encoding -/// Taken from Ring doc https://briansmith.org/rustdoc/ring/signature/index.html -fn sign_rsa(alg: Algorithm, key: &[u8], signing_input: &str) -> Result { - let ring_alg = match alg { - Algorithm::RS256 => &signature::RSA_PKCS1_SHA256, - Algorithm::RS384 => &signature::RSA_PKCS1_SHA384, - Algorithm::RS512 => &signature::RSA_PKCS1_SHA512, - _ => unreachable!(), - }; - - let key_pair = Arc::new( - signature::RSAKeyPair::from_der(untrusted::Input::from(key)) - .map_err(|_| ErrorKind::InvalidKey)? - ); - let mut signing_state = signature::RSASigningState::new(key_pair) - .map_err(|_| ErrorKind::InvalidKey)?; - let mut signature = vec![0; signing_state.key_pair().public_modulus_len()]; - let rng = rand::SystemRandom::new(); - signing_state.sign(ring_alg, &rng, signing_input.as_bytes(), &mut signature) - .map_err(|_| ErrorKind::InvalidKey)?; - - Ok( - base64::encode_config::<[u8]>(&signature, base64::URL_SAFE_NO_PAD) - ) -} - -/// Take the payload of a JWT, sign it using the algorithm given and return -/// the base64 url safe encoded of the result. -/// -/// Only use this function if you want to do something other than JWT. -pub fn sign(signing_input: &str, key: &[u8], algorithm: Algorithm) -> Result { - match algorithm { - Algorithm::HS256 => sign_hmac(&digest::SHA256, key, signing_input), - Algorithm::HS384 => sign_hmac(&digest::SHA384, key, signing_input), - Algorithm::HS512 => sign_hmac(&digest::SHA512, key, signing_input), - - Algorithm::RS256 | Algorithm::RS384 | Algorithm::RS512 => sign_rsa(algorithm, key, signing_input), -// TODO: if PKCS1 is made prublic, remove the line above and uncomment below -// Algorithm::RS256 => sign_rsa(&signature::RSA_PKCS1_SHA256, key, signing_input), -// Algorithm::RS384 => sign_rsa(&signature::RSA_PKCS1_SHA384, key, signing_input), -// Algorithm::RS512 => sign_rsa(&signature::RSA_PKCS1_SHA512, key, signing_input), - } -} - -/// See Ring RSA docs for more details -fn verify_rsa(alg: &signature::RSAParameters, signature: &str, signing_input: &str, key: &[u8]) -> Result { - let signature_bytes = base64::decode_config(signature, base64::URL_SAFE_NO_PAD)?; - let public_key_der = untrusted::Input::from(key); - let message = untrusted::Input::from(signing_input.as_bytes()); - let expected_signature = untrusted::Input::from(signature_bytes.as_slice()); - - let res = signature::verify(alg, public_key_der, message, expected_signature); - - Ok(res.is_ok()) -} - -/// Compares the signature given with a re-computed signature for HMAC or using the public key -/// for RSA. -/// -/// Only use this function if you want to do something other than JWT. -/// -/// `signature` is the signature part of a jwt (text after the second '.') -/// -/// `signing_input` is base64(header) + "." + base64(claims) -pub fn verify(signature: &str, signing_input: &str, key: &[u8], algorithm: Algorithm) -> Result { - match algorithm { - Algorithm::HS256 | Algorithm::HS384 | Algorithm::HS512 => { - // we just re-sign the data with the key and compare if they are equal - let signed = sign(signing_input, key, algorithm)?; - Ok(verify_slices_are_equal(signature.as_ref(), signed.as_ref()).is_ok()) - }, - Algorithm::RS256 => verify_rsa(&signature::RSA_PKCS1_2048_8192_SHA256, signature, signing_input, key), - Algorithm::RS384 => verify_rsa(&signature::RSA_PKCS1_2048_8192_SHA384, signature, signing_input, key), - Algorithm::RS512 => verify_rsa(&signature::RSA_PKCS1_2048_8192_SHA512, signature, signing_input, key), - } -} - -impl Default for Algorithm { - fn default() -> Self { - Algorithm::HS256 - } -} diff --git a/libs/jsonwebtoken/src/errors.rs b/libs/jsonwebtoken/src/errors.rs deleted file mode 100644 index c0af0f79..00000000 --- a/libs/jsonwebtoken/src/errors.rs +++ /dev/null @@ -1,68 +0,0 @@ -use base64; -use serde_json; -use ring; - -error_chain! { - errors { - /// When a token doesn't have a valid JWT shape - InvalidToken { - description("invalid token") - display("Invalid token") - } - /// When the signature doesn't match - InvalidSignature { - description("invalid signature") - display("Invalid signature") - } - /// When the secret given is not a valid RSA key - InvalidKey { - description("invalid key") - display("Invalid Key") - } - - // Validation error - - /// When a token’s `exp` claim indicates that it has expired - ExpiredSignature { - description("expired signature") - display("Expired Signature") - } - /// When a token’s `iss` claim does not match the expected issuer - InvalidIssuer { - description("invalid issuer") - display("Invalid Issuer") - } - /// When a token’s `aud` claim does not match one of the expected audience values - InvalidAudience { - description("invalid audience") - display("Invalid Audience") - } - /// When a token’s `aud` claim does not match one of the expected audience values - InvalidSubject { - description("invalid subject") - display("Invalid Subject") - } - /// When a token’s `iat` claim is in the future - InvalidIssuedAt { - description("invalid issued at") - display("Invalid Issued At") - } - /// When a token’s nbf claim represents a time in the future - ImmatureSignature { - description("immature signature") - display("Immature Signature") - } - /// When the algorithm in the header doesn't match the one passed to `decode` - InvalidAlgorithm { - description("Invalid algorithm") - display("Invalid Algorithm") - } - } - - foreign_links { - Unspecified(ring::error::Unspecified) #[doc = "An error happened while signing/verifying a token with RSA"]; - Base64(base64::DecodeError) #[doc = "An error happened while decoding some base64 text"]; - Json(serde_json::Error) #[doc = "An error happened while serializing/deserializing JSON"]; - Utf8(::std::string::FromUtf8Error) #[doc = "An error happened while trying to convert the result of base64 decoding to a String"]; - } -} diff --git a/libs/jsonwebtoken/src/header.rs b/libs/jsonwebtoken/src/header.rs deleted file mode 100644 index 042149c6..00000000 --- a/libs/jsonwebtoken/src/header.rs +++ /dev/null @@ -1,64 +0,0 @@ -use crypto::Algorithm; - - -/// A basic JWT header, the alg defaults to HS256 and typ is automatically -/// set to `JWT`. All the other fields are optional. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct Header { - /// The type of JWS: it can only be "JWT" here - /// - /// Defined in [RFC7515#4.1.9](https://tools.ietf.org/html/rfc7515#section-4.1.9). - #[serde(skip_serializing_if = "Option::is_none")] - pub typ: Option, - /// The algorithm used - /// - /// Defined in [RFC7515#4.1.1](https://tools.ietf.org/html/rfc7515#section-4.1.1). - pub alg: Algorithm, - /// Content type - /// - /// Defined in [RFC7519#5.2](https://tools.ietf.org/html/rfc7519#section-5.2). - #[serde(skip_serializing_if = "Option::is_none")] - pub cty: Option, - /// JSON Key URL - /// - /// Defined in [RFC7515#4.1.2](https://tools.ietf.org/html/rfc7515#section-4.1.2). - #[serde(skip_serializing_if = "Option::is_none")] - pub jku: Option, - /// Key ID - /// - /// Defined in [RFC7515#4.1.4](https://tools.ietf.org/html/rfc7515#section-4.1.4). - #[serde(skip_serializing_if = "Option::is_none")] - pub kid: Option, - /// X.509 URL - /// - /// Defined in [RFC7515#4.1.5](https://tools.ietf.org/html/rfc7515#section-4.1.5). - #[serde(skip_serializing_if = "Option::is_none")] - pub x5u: Option, - /// X.509 certificate thumbprint - /// - /// Defined in [RFC7515#4.1.7](https://tools.ietf.org/html/rfc7515#section-4.1.7). - #[serde(skip_serializing_if = "Option::is_none")] - pub x5t: Option, -} - -impl Header { - /// Returns a JWT header with the algorithm given - pub fn new(algorithm: Algorithm) -> Header { - Header { - typ: Some("JWT".to_string()), - alg: algorithm, - cty: None, - jku: None, - kid: None, - x5u: None, - x5t: None, - } - } -} - -impl Default for Header { - /// Returns a JWT header using the default Algorithm, HS256 - fn default() -> Self { - Header::new(Algorithm::default()) - } -} diff --git a/libs/jsonwebtoken/src/lib.rs b/libs/jsonwebtoken/src/lib.rs deleted file mode 100644 index 1a276398..00000000 --- a/libs/jsonwebtoken/src/lib.rs +++ /dev/null @@ -1,142 +0,0 @@ -//! Create and parses JWT (JSON Web Tokens) -//! -//! Documentation: [stable](https://docs.rs/jsonwebtoken/) -#![recursion_limit = "300"] -#![deny(missing_docs)] -#![allow(unused_doc_comments)] -#![allow(renamed_and_removed_lints)] - -#[macro_use] -extern crate error_chain; -#[macro_use] -extern crate serde_derive; -extern crate serde_json; -extern crate serde; -extern crate base64; -extern crate ring; -extern crate untrusted; -extern crate chrono; - -/// All the errors, generated using error-chain -pub mod errors; -mod header; -mod crypto; -mod serialization; -mod validation; - -pub use header::Header; -pub use crypto::{ - Algorithm, - sign, - verify, -}; -pub use validation::Validation; -pub use serialization::TokenData; - - -use serde::de::DeserializeOwned; -use serde::ser::Serialize; - -use errors::{Result, ErrorKind}; -use serialization::{from_jwt_part, from_jwt_part_claims, to_jwt_part}; -use validation::{validate}; - - -/// Encode the header and claims given and sign the payload using the algorithm from the header and the key -/// -/// ```rust,ignore -/// #[macro_use] -/// extern crate serde_derive; -/// use jsonwebtoken::{encode, Algorithm, Header}; -/// -/// /// #[derive(Debug, Serialize, Deserialize)] -/// struct Claims { -/// sub: String, -/// company: String -/// } -/// -/// let my_claims = Claims { -/// sub: "b@b.com".to_owned(), -/// company: "ACME".to_owned() -/// }; -/// -/// // my_claims is a struct that implements Serialize -/// // This will create a JWT using HS256 as algorithm -/// let token = encode(&Header::default(), &my_claims, "secret".as_ref()).unwrap(); -/// ``` -pub fn encode(header: &Header, claims: &T, key: &[u8]) -> Result { - let encoded_header = to_jwt_part(&header)?; - let encoded_claims = to_jwt_part(&claims)?; - let signing_input = [encoded_header.as_ref(), encoded_claims.as_ref()].join("."); - let signature = sign(&*signing_input, key.as_ref(), header.alg)?; - - Ok([signing_input, signature].join(".")) -} - -/// Used in decode: takes the result of a rsplit and ensure we only get 2 parts -/// Errors if we don't -macro_rules! expect_two { - ($iter:expr) => {{ - let mut i = $iter; - match (i.next(), i.next(), i.next()) { - (Some(first), Some(second), None) => (first, second), - _ => return Err(ErrorKind::InvalidToken.into()) - } - }} -} - -/// Decode a token into a struct containing 2 fields: `claims` and `header`. -/// -/// If the token or its signature is invalid or the claims fail validation, it will return an error. -/// -/// ```rust,ignore -/// #[macro_use] -/// extern crate serde_derive; -/// use jsonwebtoken::{decode, Validation, Algorithm}; -/// -/// #[derive(Debug, Serialize, Deserialize)] -/// struct Claims { -/// sub: String, -/// company: String -/// } -/// -/// let token = "a.jwt.token".to_string(); -/// // Claims is a struct that implements Deserialize -/// let token_data = decode::(&token, "secret", &Validation::new(Algorithm::HS256)); -/// ``` -pub fn decode(token: &str, key: &[u8], validation: &Validation) -> Result> { - let (signature, signing_input) = expect_two!(token.rsplitn(2, '.')); - let (claims, header) = expect_two!(signing_input.rsplitn(2, '.')); - let header: Header = from_jwt_part(header)?; - - if !verify(signature, signing_input, key, header.alg)? { - return Err(ErrorKind::InvalidSignature.into()); - } - - if !validation.algorithms.contains(&header.alg) { - return Err(ErrorKind::InvalidAlgorithm.into()); - } - - let (decoded_claims, claims_map): (T, _) = from_jwt_part_claims(claims)?; - - validate(&claims_map, validation)?; - - Ok(TokenData { header: header, claims: decoded_claims }) -} - -/// Decode a token and return the Header. This is not doing any kind of validation: it is meant to be -/// used when you don't know which `alg` the token is using and want to find out. -/// -/// If the token has an invalid format, it will return an error. -/// -/// ```rust,ignore -/// use jsonwebtoken::decode_header; -/// -/// let token = "a.jwt.token".to_string(); -/// let header = decode_header(&token); -/// ``` -pub fn decode_header(token: &str) -> Result
{ - let (_, signing_input) = expect_two!(token.rsplitn(2, '.')); - let (_, header) = expect_two!(signing_input.rsplitn(2, '.')); - from_jwt_part(header) -} diff --git a/libs/jsonwebtoken/src/serialization.rs b/libs/jsonwebtoken/src/serialization.rs deleted file mode 100644 index 60dd9fb9..00000000 --- a/libs/jsonwebtoken/src/serialization.rs +++ /dev/null @@ -1,42 +0,0 @@ -use base64; -use serde::de::DeserializeOwned; -use serde::ser::Serialize; -use serde_json::{from_str, to_string, Value}; -use serde_json::map::Map; - -use errors::{Result}; -use header::Header; - - -/// The return type of a successful call to decode -#[derive(Debug)] -pub struct TokenData { - /// The decoded JWT header - pub header: Header, - /// The decoded JWT claims - pub claims: T -} - -/// Serializes to JSON and encodes to base64 -pub fn to_jwt_part(input: &T) -> Result { - let encoded = to_string(input)?; - Ok(base64::encode_config(encoded.as_bytes(), base64::URL_SAFE_NO_PAD)) -} - -/// Decodes from base64 and deserializes from JSON to a struct -pub fn from_jwt_part, T: DeserializeOwned>(encoded: B) -> Result { - let decoded = base64::decode_config(encoded.as_ref(), base64::URL_SAFE_NO_PAD)?; - let s = String::from_utf8(decoded)?; - - Ok(from_str(&s)?) -} - -/// Decodes from base64 and deserializes from JSON to a struct AND a hashmap -pub fn from_jwt_part_claims, T: DeserializeOwned>(encoded: B) -> Result<(T, Map)> { - let decoded = base64::decode_config(encoded.as_ref(), base64::URL_SAFE_NO_PAD)?; - let s = String::from_utf8(decoded)?; - - let claims: T = from_str(&s)?; - let map: Map<_,_> = from_str(&s)?; - Ok((claims, map)) -} diff --git a/libs/jsonwebtoken/src/validation.rs b/libs/jsonwebtoken/src/validation.rs deleted file mode 100644 index 7025b913..00000000 --- a/libs/jsonwebtoken/src/validation.rs +++ /dev/null @@ -1,377 +0,0 @@ -use chrono::Utc; -use serde::ser::Serialize; -use serde_json::{Value, from_value, to_value}; -use serde_json::map::Map; - -use errors::{Result, ErrorKind}; -use crypto::Algorithm; - - -/// Contains the various validations that are applied after decoding a token. -/// -/// All time validation happen on UTC timestamps. -/// -/// ```rust -/// use jsonwebtoken::Validation; -/// -/// // Default value -/// let validation = Validation::default(); -/// -/// // Changing one parameter -/// let mut validation = Validation {leeway: 60, ..Default::default()}; -/// -/// // Setting audience -/// let mut validation = Validation::default(); -/// validation.set_audience(&"Me"); // string -/// validation.set_audience(&["Me", "You"]); // array of strings -/// ``` -#[derive(Debug, Clone, PartialEq)] -pub struct Validation { - /// Add some leeway (in seconds) to the `exp`, `iat` and `nbf` validation to - /// account for clock skew. - /// - /// Defaults to `0`. - pub leeway: i64, - /// Whether to validate the `exp` field. - /// - /// It will return an error if the time in the `exp` field is past. - /// - /// Defaults to `true`. - pub validate_exp: bool, - /// Whether to validate the `iat` field. - /// - /// It will return an error if the time in the `iat` field is in the future. - /// - /// Defaults to `true`. - pub validate_iat: bool, - /// Whether to validate the `nbf` field. - /// - /// It will return an error if the current timestamp is before the time in the `nbf` field. - /// - /// Defaults to `true`. - pub validate_nbf: bool, - /// If it contains a value, the validation will check that the `aud` field is the same as the - /// one provided and will error otherwise. - /// Since `aud` can be either a String or a Vec in the JWT spec, you will need to use - /// the [set_audience](struct.Validation.html#method.set_audience) method to set it. - /// - /// Defaults to `None`. - pub aud: Option, - /// If it contains a value, the validation will check that the `iss` field is the same as the - /// one provided and will error otherwise. - /// - /// Defaults to `None`. - pub iss: Option, - /// If it contains a value, the validation will check that the `sub` field is the same as the - /// one provided and will error otherwise. - /// - /// Defaults to `None`. - pub sub: Option, - /// If it contains a value, the validation will check that the `alg` of the header is contained - /// in the ones provided and will error otherwise. - /// - /// Defaults to `vec![Algorithm::HS256]`. - pub algorithms: Vec, -} - -impl Validation { - /// Create a default validation setup allowing the given alg - pub fn new(alg: Algorithm) -> Validation { - let mut validation = Validation::default(); - validation.algorithms = vec![alg]; - validation - } - - /// Since `aud` can be either a String or an array of String in the JWT spec, this method will take - /// care of serializing the value. - pub fn set_audience(&mut self, audience: &T) { - self.aud = Some(to_value(audience).unwrap()); - } -} - -impl Default for Validation { - fn default() -> Validation { - Validation { - leeway: 0, - - validate_exp: true, - validate_iat: true, - validate_nbf: true, - - iss: None, - sub: None, - aud: None, - - algorithms: vec![Algorithm::HS256], - } - } -} - - - -pub fn validate(claims: &Map, options: &Validation) -> Result<()> { - let now = Utc::now().timestamp(); - - if let Some(iat) = claims.get("iat") { - if options.validate_iat && from_value::(iat.clone())? > now + options.leeway { - return Err(ErrorKind::InvalidIssuedAt.into()); - } - } - - if let Some(exp) = claims.get("exp") { - if options.validate_exp && from_value::(exp.clone())? < now - options.leeway { - return Err(ErrorKind::ExpiredSignature.into()); - } - } - - if let Some(nbf) = claims.get("nbf") { - if options.validate_nbf && from_value::(nbf.clone())? > now + options.leeway { - return Err(ErrorKind::ImmatureSignature.into()); - } - } - - if let Some(iss) = claims.get("iss") { - if let Some(ref correct_iss) = options.iss { - if from_value::(iss.clone())? != *correct_iss { - return Err(ErrorKind::InvalidIssuer.into()); - } - } - } - - if let Some(sub) = claims.get("sub") { - if let Some(ref correct_sub) = options.sub { - if from_value::(sub.clone())? != *correct_sub { - return Err(ErrorKind::InvalidSubject.into()); - } - } - } - - if let Some(aud) = claims.get("aud") { - if let Some(ref correct_aud) = options.aud { - if aud != correct_aud { - return Err(ErrorKind::InvalidAudience.into()); - } - } - } - - Ok(()) -} - - -#[cfg(test)] -mod tests { - use serde_json::{to_value}; - use serde_json::map::Map; - use chrono::Utc; - - use super::{validate, Validation}; - - use errors::ErrorKind; - - #[test] - fn iat_in_past_ok() { - let mut claims = Map::new(); - claims.insert("iat".to_string(), to_value(Utc::now().timestamp() - 10000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_ok()); - } - - #[test] - fn iat_in_future_fails() { - let mut claims = Map::new(); - claims.insert("iat".to_string(), to_value(Utc::now().timestamp() + 100000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::InvalidIssuedAt => (), - _ => assert!(false), - }; - } - - #[test] - fn iat_in_future_but_in_leeway_ok() { - let mut claims = Map::new(); - claims.insert("iat".to_string(), to_value(Utc::now().timestamp() + 50).unwrap()); - let validation = Validation { - leeway: 1000 * 60, - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn exp_in_future_ok() { - let mut claims = Map::new(); - claims.insert("exp".to_string(), to_value(Utc::now().timestamp() + 10000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_ok()); - } - - #[test] - fn exp_in_past_fails() { - let mut claims = Map::new(); - claims.insert("exp".to_string(), to_value(Utc::now().timestamp() - 100000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::ExpiredSignature => (), - _ => assert!(false), - }; - } - - #[test] - fn exp_in_past_but_in_leeway_ok() { - let mut claims = Map::new(); - claims.insert("exp".to_string(), to_value(Utc::now().timestamp() - 500).unwrap()); - let validation = Validation { - leeway: 1000 * 60, - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn nbf_in_past_ok() { - let mut claims = Map::new(); - claims.insert("nbf".to_string(), to_value(Utc::now().timestamp() - 10000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_ok()); - } - - #[test] - fn nbf_in_future_fails() { - let mut claims = Map::new(); - claims.insert("nbf".to_string(), to_value(Utc::now().timestamp() + 100000).unwrap()); - let res = validate(&claims, &Validation::default()); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::ImmatureSignature => (), - _ => assert!(false), - }; - } - - #[test] - fn nbf_in_future_but_in_leeway_ok() { - let mut claims = Map::new(); - claims.insert("nbf".to_string(), to_value(Utc::now().timestamp() + 500).unwrap()); - let validation = Validation { - leeway: 1000 * 60, - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn iss_ok() { - let mut claims = Map::new(); - claims.insert("iss".to_string(), to_value("Keats").unwrap()); - let validation = Validation { - iss: Some("Keats".to_string()), - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn iss_not_matching_fails() { - let mut claims = Map::new(); - claims.insert("iss".to_string(), to_value("Hacked").unwrap()); - let validation = Validation { - iss: Some("Keats".to_string()), - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::InvalidIssuer => (), - _ => assert!(false), - }; - } - - #[test] - fn sub_ok() { - let mut claims = Map::new(); - claims.insert("sub".to_string(), to_value("Keats").unwrap()); - let validation = Validation { - sub: Some("Keats".to_string()), - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn sub_not_matching_fails() { - let mut claims = Map::new(); - claims.insert("sub".to_string(), to_value("Hacked").unwrap()); - let validation = Validation { - sub: Some("Keats".to_string()), - ..Default::default() - }; - let res = validate(&claims, &validation); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::InvalidSubject => (), - _ => assert!(false), - }; - } - - #[test] - fn aud_string_ok() { - let mut claims = Map::new(); - claims.insert("aud".to_string(), to_value("Everyone").unwrap()); - let mut validation = Validation::default(); - validation.set_audience(&"Everyone"); - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn aud_array_of_string_ok() { - let mut claims = Map::new(); - claims.insert("aud".to_string(), to_value(["UserA", "UserB"]).unwrap()); - let mut validation = Validation::default(); - validation.set_audience(&["UserA", "UserB"]); - let res = validate(&claims, &validation); - assert!(res.is_ok()); - } - - #[test] - fn aud_type_mismatch_fails() { - let mut claims = Map::new(); - claims.insert("aud".to_string(), to_value("Everyone").unwrap()); - let mut validation = Validation::default(); - validation.set_audience(&["UserA", "UserB"]); - let res = validate(&claims, &validation); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::InvalidAudience => (), - _ => assert!(false), - }; - } - - #[test] - fn aud_correct_type_not_matching_fails() { - let mut claims = Map::new(); - claims.insert("aud".to_string(), to_value("Everyone").unwrap()); - let mut validation = Validation::default(); - validation.set_audience(&"None"); - let res = validate(&claims, &validation); - assert!(res.is_err()); - - match res.unwrap_err().kind() { - &ErrorKind::InvalidAudience => (), - _ => assert!(false), - }; - } -} diff --git a/rust-toolchain b/rust-toolchain index e6a7f262..0147c3ef 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-10-03 +nightly-2018-10-31 diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index a92c6295..aad95d15 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -1,4 +1,4 @@ -use rocket_contrib::Json; +use rocket_contrib::json::Json; use db::DbConn; use db::models::*; @@ -9,6 +9,29 @@ use mail; use CONFIG; +use rocket::Route; + +pub fn routes() -> Vec { + routes![ + register, + profile, + put_profile, + post_profile, + get_public_keys, + post_keys, + post_password, + post_kdf, + post_sstamp, + post_email_token, + post_email, + delete_account, + post_delete_account, + revision_date, + password_hint, + prelogin, + ] +} + #[derive(Deserialize, Debug)] #[allow(non_snake_case)] struct RegisterData { diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index d86e41dc..023e57ce 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -1,35 +1,75 @@ -use std::path::Path; use std::collections::HashSet; +use std::path::Path; -use rocket::State; -use rocket::Data; use rocket::http::ContentType; +use rocket::{request::Form, Data, Route, State}; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; +use serde_json::Value; -use multipart::server::{Multipart, SaveResult}; use multipart::server::save::SavedData; +use multipart::server::{Multipart, SaveResult}; use data_encoding::HEXLOWER; -use db::DbConn; use db::models::*; +use db::DbConn; use crypto; -use api::{self, PasswordData, JsonResult, EmptyResult, JsonUpcase, WebSocketUsers, UpdateType}; +use api::{self, EmptyResult, JsonResult, JsonUpcase, PasswordData, UpdateType, WebSocketUsers}; use auth::Headers; use CONFIG; -#[derive(FromForm)] -#[allow(non_snake_case)] -struct SyncData { - excludeDomains: bool, +pub fn routes() -> Vec { + routes![ + sync, + get_ciphers, + get_cipher, + get_cipher_admin, + get_cipher_details, + post_ciphers, + put_cipher_admin, + post_ciphers_admin, + post_ciphers_import, + post_attachment, + post_attachment_admin, + post_attachment_share, + delete_attachment_post, + delete_attachment_post_admin, + delete_attachment, + delete_attachment_admin, + post_cipher_admin, + post_cipher_share, + put_cipher_share, + put_cipher_share_seleted, + post_cipher, + put_cipher, + delete_cipher_post, + delete_cipher_post_admin, + delete_cipher, + delete_cipher_admin, + delete_cipher_selected, + delete_cipher_selected_post, + delete_all, + move_cipher_selected, + move_cipher_selected_put, + + post_collections_update, + post_collections_admin, + put_collections_admin, + ] } -#[get("/sync?")] -fn sync(data: SyncData, headers: Headers, conn: DbConn) -> JsonResult { +#[derive(FromForm, Default)] +struct SyncData { + #[form(field = "excludeDomains")] + exclude_domains: bool, // Default: 'false' +} + +#[get("/sync?")] +fn sync(data: Form, headers: Headers, conn: DbConn) -> JsonResult { let user_json = headers.user.to_json(&conn); let folders = Folder::find_by_user(&headers.user.uuid, &conn); @@ -41,7 +81,7 @@ fn sync(data: SyncData, headers: Headers, conn: DbConn) -> JsonResult { let ciphers = Cipher::find_by_user(&headers.user.uuid, &conn); let ciphers_json: Vec = ciphers.iter().map(|c| c.to_json(&headers.host, &headers.user.uuid, &conn)).collect(); - let domains_json = if data.excludeDomains { Value::Null } else { api::core::get_eq_domains(headers).unwrap().into_inner() }; + let domains_json = if data.exclude_domains { Value::Null } else { api::core::get_eq_domains(headers).unwrap().into_inner() }; Ok(Json(json!({ "Profile": user_json, @@ -53,14 +93,6 @@ fn sync(data: SyncData, headers: Headers, conn: DbConn) -> JsonResult { }))) } -#[get("/sync")] -fn sync_no_query(headers: Headers, conn: DbConn) -> JsonResult { - let sync_data = SyncData { - excludeDomains: false, - }; - sync(sync_data, headers, conn) -} - #[get("/ciphers")] fn get_ciphers(headers: Headers, conn: DbConn) -> JsonResult { let ciphers = Cipher::find_by_user(&headers.user.uuid, &conn); @@ -695,8 +727,7 @@ fn delete_all(data: JsonUpcase, headers: Headers, conn: DbConn, ws for f in Folder::find_by_user(&user.uuid, &conn) { if f.delete(&conn).is_err() { err!("Failed deleting folder") - } - else { + } else { ws.send_folder_update(UpdateType::SyncFolderCreate, &f); } } diff --git a/src/api/core/folders.rs b/src/api/core/folders.rs index 91114605..e60c281f 100644 --- a/src/api/core/folders.rs +++ b/src/api/core/folders.rs @@ -1,5 +1,6 @@ use rocket::State; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; +use serde_json::Value; use db::DbConn; use db::models::*; @@ -7,6 +8,20 @@ use db::models::*; use api::{JsonResult, EmptyResult, JsonUpcase, WebSocketUsers, UpdateType}; use auth::Headers; +use rocket::Route; + +pub fn routes() -> Vec { + routes![ + get_folders, + get_folder, + post_folders, + post_folder, + put_folder, + delete_folder_post, + delete_folder, + ] +} + #[get("/folders")] fn get_folders(headers: Headers, conn: DbConn) -> JsonResult { let folders = Folder::find_by_user(&headers.user.uuid, &conn); diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index 205bd5b2..dcc2821c 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -4,126 +4,25 @@ mod folders; mod organizations; pub(crate) mod two_factor; -use self::accounts::*; -use self::ciphers::*; -use self::folders::*; -use self::organizations::*; -use self::two_factor::*; - pub fn routes() -> Vec { - routes![ - register, - profile, - put_profile, - post_profile, - get_public_keys, - post_keys, - post_password, - post_kdf, - post_sstamp, - post_email_token, - post_email, - delete_account, - post_delete_account, - revision_date, - password_hint, - prelogin, - - sync, - sync_no_query, - - get_ciphers, - get_cipher, - get_cipher_admin, - get_cipher_details, - post_ciphers, - put_cipher_admin, - post_ciphers_admin, - post_ciphers_import, - post_attachment, - post_attachment_admin, - post_attachment_share, - delete_attachment_post, - delete_attachment_post_admin, - delete_attachment, - delete_attachment_admin, - post_cipher_admin, - post_cipher_share, - put_cipher_share, - put_cipher_share_seleted, - post_cipher, - put_cipher, - delete_cipher_post, - delete_cipher_post_admin, - delete_cipher, - delete_cipher_admin, - delete_cipher_selected, - delete_cipher_selected_post, - delete_all, - move_cipher_selected, - move_cipher_selected_put, - - get_folders, - get_folder, - post_folders, - post_folder, - put_folder, - delete_folder_post, - delete_folder, - - get_twofactor, - get_recover, - recover, - disable_twofactor, - disable_twofactor_put, - generate_authenticator, - activate_authenticator, - activate_authenticator_put, - generate_u2f, - activate_u2f, - activate_u2f_put, - - get_organization, - create_organization, - delete_organization, - post_delete_organization, - leave_organization, - get_user_collections, - get_org_collections, - get_org_collection_detail, - get_collection_users, - put_organization, - post_organization, - post_organization_collections, - delete_organization_collection_user, - post_organization_collection_delete_user, - post_organization_collection_update, - put_organization_collection_update, - delete_organization_collection, - post_organization_collection_delete, - post_collections_update, - post_collections_admin, - put_collections_admin, - get_org_details, - get_org_users, - send_invite, - confirm_invite, - get_user, - edit_user, - put_organization_user, - delete_user, - post_delete_user, - post_reinvite_user, - post_org_import, - + let mut mod_routes = routes![ clear_device_token, put_device_token, get_eq_domains, post_eq_domains, put_eq_domains, + ]; - ] + let mut routes = Vec::new(); + routes.append(&mut accounts::routes()); + routes.append(&mut ciphers::routes()); + routes.append(&mut folders::routes()); + routes.append(&mut organizations::routes()); + routes.append(&mut two_factor::routes()); + routes.append(&mut mod_routes); + + routes } /// @@ -132,7 +31,8 @@ pub fn routes() -> Vec { use rocket::Route; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; +use serde_json::Value; use db::DbConn; use db::models::*; @@ -141,8 +41,8 @@ use api::{JsonResult, EmptyResult, JsonUpcase}; use auth::Headers; #[put("/devices/identifier//clear-token", data = "")] -fn clear_device_token(uuid: String, data: Json, headers: Headers, conn: DbConn) -> EmptyResult { - let _data: Value = data.into_inner(); +fn clear_device_token(uuid: String, data: JsonUpcase, headers: Headers, conn: DbConn) -> EmptyResult { + let _data: Value = data.into_inner().data; let device = match Device::find_by_uuid(&uuid, &conn) { Some(device) => device, @@ -160,8 +60,8 @@ fn clear_device_token(uuid: String, data: Json, headers: Headers, conn: D } #[put("/devices/identifier//token", data = "")] -fn put_device_token(uuid: String, data: Json, headers: Headers, conn: DbConn) -> JsonResult { - let _data: Value = data.into_inner(); +fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers, conn: DbConn) -> JsonResult { + let _data: Value = data.into_inner().data; let device = match Device::find_by_uuid(&uuid, &conn) { Some(device) => device, diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index af8d9282..715de7cf 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -1,5 +1,8 @@ use rocket::State; -use rocket_contrib::{Json, Value}; +use rocket::request::Form; +use rocket_contrib::json::Json; +use serde_json::Value; + use CONFIG; use db::DbConn; use db::models::*; @@ -9,6 +12,42 @@ use auth::{Headers, AdminHeaders, OwnerHeaders}; use serde::{Deserialize, Deserializer}; +use rocket::Route; + +pub fn routes() -> Vec { + routes![ + get_organization, + create_organization, + delete_organization, + post_delete_organization, + leave_organization, + get_user_collections, + get_org_collections, + get_org_collection_detail, + get_collection_users, + put_organization, + post_organization, + post_organization_collections, + delete_organization_collection_user, + post_organization_collection_delete_user, + post_organization_collection_update, + put_organization_collection_update, + delete_organization_collection, + post_organization_collection_delete, + get_org_details, + get_org_users, + send_invite, + confirm_invite, + get_user, + edit_user, + put_organization_user, + delete_user, + post_delete_user, + post_reinvite_user, + post_org_import, + ] +} + #[derive(Deserialize)] #[allow(non_snake_case)] @@ -315,14 +354,14 @@ fn get_collection_users(org_id: String, coll_id: String, _headers: AdminHeaders, } #[derive(FromForm)] -#[allow(non_snake_case)] struct OrgIdData { - organizationId: String + #[form(field = "organizationId")] + organization_id: String } -#[get("/ciphers/organization-details?")] -fn get_org_details(data: OrgIdData, headers: Headers, conn: DbConn) -> JsonResult { - let ciphers = Cipher::find_by_org(&data.organizationId, &conn); +#[get("/ciphers/organization-details?")] +fn get_org_details(data: Form, headers: Headers, conn: DbConn) -> JsonResult { + let ciphers = Cipher::find_by_org(&data.organization_id, &conn); let ciphers_json: Vec = ciphers.iter().map(|c| c.to_json(&headers.host, &headers.user.uuid, &conn)).collect(); Ok(Json(json!({ @@ -643,10 +682,10 @@ struct RelationsData { Value: usize, } -#[post("/ciphers/import-organization?", data = "")] -fn post_org_import(query: OrgIdData, data: JsonUpcase, headers: Headers, conn: DbConn, ws: State) -> EmptyResult { +#[post("/ciphers/import-organization?", data = "")] +fn post_org_import(query: Form, data: JsonUpcase, headers: Headers, conn: DbConn, ws: State) -> EmptyResult { let data: ImportData = data.into_inner().data; - let org_id = query.organizationId; + let org_id = query.into_inner().organization_id; let org_user = match UserOrganization::find_by_user_and_org(&headers.user.uuid, &org_id, &conn) { Some(user) => user, @@ -700,4 +739,4 @@ fn post_org_import(query: OrgIdData, data: JsonUpcase, headers: Head Ok(()) => Ok(()), Err(_) => err!("Failed to update the revision, please log out and log back in to finish import.") } -} \ No newline at end of file +} diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs index 7d412e54..a15d2512 100644 --- a/src/api/core/two_factor.rs +++ b/src/api/core/two_factor.rs @@ -1,6 +1,8 @@ use data_encoding::BASE32; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; use serde_json; +use serde_json::Value; + use db::{ models::{TwoFactor, TwoFactorType, User}, @@ -12,6 +14,24 @@ use crypto; use api::{ApiResult, JsonResult, JsonUpcase, NumberOrString, PasswordData}; use auth::Headers; +use rocket::Route; + +pub fn routes() -> Vec { + routes![ + get_twofactor, + get_recover, + recover, + disable_twofactor, + disable_twofactor_put, + generate_authenticator, + activate_authenticator, + activate_authenticator_put, + generate_u2f, + activate_u2f, + activate_u2f_put, + ] +} + #[get("/two-factor")] fn get_twofactor(headers: Headers, conn: DbConn) -> JsonResult { let twofactors = TwoFactor::find_by_user(&headers.user.uuid, &conn); diff --git a/src/api/identity.rs b/src/api/identity.rs index 175c5afc..1493692d 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -4,7 +4,8 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use rocket::request::{self, Form, FormItems, FromForm, FromRequest, Request}; use rocket::{Outcome, Route}; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; +use serde_json::Value; use num_traits::FromPrimitive; @@ -21,9 +22,9 @@ pub fn routes() -> Vec { routes![login] } -#[post("/connect/token", data = "")] -fn login(connect_data: Form, device_type: DeviceType, conn: DbConn, socket: Option) -> JsonResult { - let data = connect_data.get(); +#[post("/connect/token", data = "")] +fn login(data: Form, device_type: DeviceType, conn: DbConn, socket: Option) -> JsonResult { + let data: ConnectData = data.into_inner(); match data.grant_type { GrantType::RefreshToken => _refresh_login(data, device_type, conn), @@ -31,7 +32,7 @@ fn login(connect_data: Form, device_type: DeviceType, conn: DbConn, } } -fn _refresh_login(data: &ConnectData, _device_type: DeviceType, conn: DbConn) -> JsonResult { +fn _refresh_login(data: ConnectData, _device_type: DeviceType, conn: DbConn) -> JsonResult { // Extract token let token = data.get("refresh_token"); @@ -59,7 +60,7 @@ fn _refresh_login(data: &ConnectData, _device_type: DeviceType, conn: DbConn) -> } } -fn _password_login(data: &ConnectData, device_type: DeviceType, conn: DbConn, remote: Option) -> JsonResult { +fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, remote: Option) -> JsonResult { // Get the ip for error reporting let ip = match remote { Some(ip) => ip.ip(), @@ -319,11 +320,9 @@ impl<'f> FromForm<'f> for ConnectData { let mut data = HashMap::new(); // Insert data into map - for (key, value) in items { - match (key.url_decode(), value.url_decode()) { - (Ok(key), Ok(value)) => data.insert(key.to_lowercase(), value), - _ => return Err("Error decoding key or value".to_string()), - }; + for item in items { + let (key, value) = item.key_value_decoded(); + data.insert(key.to_lowercase(), value); } // Validate needed values diff --git a/src/api/mod.rs b/src/api/mod.rs index 51bf0b8a..332b3cf0 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -12,11 +12,12 @@ pub use self::notifications::routes as notifications_routes; pub use self::notifications::{start_notification_server, WebSocketUsers, UpdateType}; use rocket::response::status::BadRequest; -use rocket_contrib::Json; +use rocket_contrib::json::Json; +use serde_json::Value; // Type aliases for API methods results -type ApiResult = Result>; -type JsonResult = ApiResult; +type ApiResult = Result>>; +type JsonResult = ApiResult>; type EmptyResult = ApiResult<()>; use util; diff --git a/src/api/notifications.rs b/src/api/notifications.rs index d5707f0c..70d7326b 100644 --- a/src/api/notifications.rs +++ b/src/api/notifications.rs @@ -1,5 +1,5 @@ use rocket::Route; -use rocket_contrib::Json; +use rocket_contrib::json::Json; use serde_json::Value as JsonValue; use api::JsonResult; diff --git a/src/api/web.rs b/src/api/web.rs index 33a8d308..53b7d9a4 100644 --- a/src/api/web.rs +++ b/src/api/web.rs @@ -6,7 +6,8 @@ use rocket::response::{self, NamedFile, Responder}; use rocket::response::content::Content; use rocket::http::{ContentType, Status}; use rocket::Route; -use rocket_contrib::{Json, Value}; +use rocket_contrib::json::Json; +use serde_json::Value; use CONFIG; diff --git a/src/auth.rs b/src/auth.rs index 6b541a6b..cc28b3ba 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -40,7 +40,7 @@ pub fn decode_jwt(token: &str) -> Result { let validation = jwt::Validation { leeway: 30, // 30 seconds validate_exp: true, - validate_iat: true, + validate_iat: false, // IssuedAt is the same as NotBefore validate_nbf: true, aud: None, iss: Some(JWT_ISSUER.clone()), @@ -197,8 +197,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { Outcome::Success(headers) => { // org_id is expected to be the first dynamic param match request.get_param::(0) { - Err(_) => err_handler!("Error getting the organization id"), - Ok(org_id) => { + Some(Ok(org_id)) => { let conn = match request.guard::() { Outcome::Success(conn) => conn, _ => err_handler!("Error getting DB") @@ -227,7 +226,8 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { user: headers.user, org_user_type: org_user.type_, }) - } + }, + _ => err_handler!("Error getting the organization id"), } } } diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index cfae5fba..4e2038dc 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -1,4 +1,4 @@ -use serde_json::Value as JsonValue; +use serde_json::Value; use super::Cipher; use CONFIG; @@ -29,7 +29,7 @@ impl Attachment { format!("{}/{}/{}", CONFIG.attachments_folder, self.cipher_uuid, self.id) } - pub fn to_json(&self, host: &str) -> JsonValue { + pub fn to_json(&self, host: &str) -> Value { use util::get_display_size; let web_path = format!("{}/attachments/{}/{}", host, self.cipher_uuid, self.id); diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index db0db473..d9890803 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -1,5 +1,5 @@ use chrono::{NaiveDateTime, Utc}; -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; @@ -68,23 +68,23 @@ use db::schema::*; /// Database methods impl Cipher { - pub fn to_json(&self, host: &str, user_uuid: &str, conn: &DbConn) -> JsonValue { + pub fn to_json(&self, host: &str, user_uuid: &str, conn: &DbConn) -> Value { use serde_json; use util::format_date; use super::Attachment; let attachments = Attachment::find_by_cipher(&self.uuid, conn); - let attachments_json: Vec = attachments.iter().map(|c| c.to_json(host)).collect(); + let attachments_json: Vec = attachments.iter().map(|c| c.to_json(host)).collect(); - let fields_json: JsonValue = if let Some(ref fields) = self.fields { + let fields_json: Value = if let Some(ref fields) = self.fields { serde_json::from_str(fields).unwrap() - } else { JsonValue::Null }; + } else { Value::Null }; - let password_history_json: JsonValue = if let Some(ref password_history) = self.password_history { + let password_history_json: Value = if let Some(ref password_history) = self.password_history { serde_json::from_str(password_history).unwrap() - } else { JsonValue::Null }; + } else { Value::Null }; - let mut data_json: JsonValue = serde_json::from_str(&self.data).unwrap(); + let mut data_json: Value = serde_json::from_str(&self.data).unwrap(); // TODO: ******* Backwards compat start ********** // To remove backwards compatibility, just remove this entire section diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs index bcbacbe4..0535cef4 100644 --- a/src/db/models/collection.rs +++ b/src/db/models/collection.rs @@ -1,4 +1,4 @@ -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; @@ -25,7 +25,7 @@ impl Collection { } } - pub fn to_json(&self) -> JsonValue { + pub fn to_json(&self) -> Value { json!({ "Id": self.uuid, "OrganizationId": self.org_uuid, diff --git a/src/db/models/folder.rs b/src/db/models/folder.rs index 2808b929..5b52a557 100644 --- a/src/db/models/folder.rs +++ b/src/db/models/folder.rs @@ -1,5 +1,5 @@ use chrono::{NaiveDateTime, Utc}; -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; @@ -42,7 +42,7 @@ impl Folder { } } - pub fn to_json(&self) -> JsonValue { + pub fn to_json(&self) -> Value { use util::format_date; json!({ diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 7f55cd89..c9ba5d6c 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -1,4 +1,4 @@ -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; use super::{User, CollectionUser, Invitation}; @@ -70,7 +70,7 @@ impl Organization { } } - pub fn to_json(&self) -> JsonValue { + pub fn to_json(&self) -> Value { json!({ "Id": self.uuid, "Name": self.name, @@ -181,7 +181,7 @@ impl Organization { } impl UserOrganization { - pub fn to_json(&self, conn: &DbConn) -> JsonValue { + pub fn to_json(&self, conn: &DbConn) -> Value { let org = Organization::find_by_uuid(&self.org_uuid, conn).unwrap(); json!({ @@ -209,7 +209,7 @@ impl UserOrganization { }) } - pub fn to_json_user_details(&self, conn: &DbConn) -> JsonValue { + pub fn to_json_user_details(&self, conn: &DbConn) -> Value { let user = User::find_by_uuid(&self.user_uuid, conn).unwrap(); json!({ @@ -226,7 +226,7 @@ impl UserOrganization { }) } - pub fn to_json_collection_user_details(&self, read_only: bool, conn: &DbConn) -> JsonValue { + pub fn to_json_collection_user_details(&self, read_only: bool, conn: &DbConn) -> Value { let user = User::find_by_uuid(&self.user_uuid, conn).unwrap(); json!({ @@ -241,7 +241,7 @@ impl UserOrganization { }) } - pub fn to_json_details(&self, conn: &DbConn) -> JsonValue { + pub fn to_json_details(&self, conn: &DbConn) -> Value { let coll_uuids = if self.access_all { vec![] // If we have complete access, no need to fill the array } else { diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs index 772887bf..b47a3a81 100644 --- a/src/db/models/two_factor.rs +++ b/src/db/models/two_factor.rs @@ -1,4 +1,4 @@ -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; @@ -59,7 +59,7 @@ impl TwoFactor { generated == totp_code } - pub fn to_json(&self) -> JsonValue { + pub fn to_json(&self) -> Value { json!({ "Enabled": self.enabled, "Key": "", // This key and value vary @@ -67,7 +67,7 @@ impl TwoFactor { }) } - pub fn to_json_list(&self) -> JsonValue { + pub fn to_json_list(&self) -> Value { json!({ "Enabled": self.enabled, "Type": self.type_, diff --git a/src/db/models/user.rs b/src/db/models/user.rs index d39c0350..064a8a6e 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -1,5 +1,5 @@ use chrono::{NaiveDateTime, Utc}; -use serde_json::Value as JsonValue; +use serde_json::Value; use uuid::Uuid; @@ -120,14 +120,14 @@ use super::{Cipher, Folder, Device, UserOrganization, UserOrgType}; /// Database methods impl User { - pub fn to_json(&self, conn: &DbConn) -> JsonValue { + pub fn to_json(&self, conn: &DbConn) -> Value { use super::{UserOrganization, UserOrgType, UserOrgStatus, TwoFactor}; let mut orgs = UserOrganization::find_by_user(&self.uuid, conn); if self.is_server_admin() { orgs.push(UserOrganization::new_virtual(self.uuid.clone(), UserOrgType::Owner, UserOrgStatus::Confirmed)); } - let orgs_json: Vec = orgs.iter().map(|c| c.to_json(&conn)).collect(); + let orgs_json: Vec = orgs.iter().map(|c| c.to_json(&conn)).collect(); let twofactor_enabled = !TwoFactor::find_by_user(&self.uuid, conn).is_empty(); json!({ diff --git a/src/main.rs b/src/main.rs index db560661..7262b505 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,8 @@ -#![feature(plugin, custom_derive, vec_remove_item, try_trait)] -#![plugin(rocket_codegen)] +#![feature(proc_macro_hygiene, decl_macro, custom_derive, vec_remove_item, try_trait)] #![recursion_limit="128"] #![allow(proc_macro_derive_resolution_fallback)] // TODO: Remove this when diesel update fixes warnings + +#[macro_use] extern crate rocket; extern crate rocket_contrib; extern crate reqwest; diff --git a/src/util.rs b/src/util.rs index 714d19d0..69f64041 100644 --- a/src/util.rs +++ b/src/util.rs @@ -23,7 +23,7 @@ macro_rules! err { #[macro_export] macro_rules! err_json { ($expr:expr) => {{ - return Err($crate::rocket::response::status::BadRequest(Some($crate::rocket_contrib::Json($expr)))); + return Err($crate::rocket::response::status::BadRequest(Some($crate::rocket_contrib::json::Json($expr)))); }} } From bc532f54d5ae5728704d87fe6323843819c1fc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 17 Oct 2018 22:25:28 +0200 Subject: [PATCH 02/24] Improve login query parsing --- src/api/identity.rs | 211 ++++++++++++++++++-------------------------- 1 file changed, 86 insertions(+), 125 deletions(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index 1493692d..ac48b2f9 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -1,8 +1,7 @@ -use std::collections::HashMap; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use rocket::request::{self, Form, FormItems, FromForm, FromRequest, Request}; -use rocket::{Outcome, Route}; +use rocket::request::LenientForm; +use rocket::Route; use rocket_contrib::json::Json; use serde_json::Value; @@ -14,7 +13,7 @@ use db::DbConn; use util::{self, JsonMap}; -use api::{ApiResult, JsonResult}; +use api::{ApiResult, EmptyResult, JsonResult}; use CONFIG; @@ -23,21 +22,22 @@ pub fn routes() -> Vec { } #[post("/connect/token", data = "")] -fn login(data: Form, device_type: DeviceType, conn: DbConn, socket: Option) -> JsonResult { +fn login(data: LenientForm, conn: DbConn, socket: Option) -> JsonResult { let data: ConnectData = data.into_inner(); + validate_data(&data)?; match data.grant_type { - GrantType::RefreshToken => _refresh_login(data, device_type, conn), - GrantType::Password => _password_login(data, device_type, conn, socket), + GrantType::refresh_token => _refresh_login(data, conn), + GrantType::password => _password_login(data, conn, socket), } } -fn _refresh_login(data: ConnectData, _device_type: DeviceType, conn: DbConn) -> JsonResult { +fn _refresh_login(data: ConnectData, conn: DbConn) -> JsonResult { // Extract token - let token = data.get("refresh_token"); + let token = data.refresh_token.unwrap(); // Get device by refresh token - let mut device = match Device::find_by_refresh_token(token, &conn) { + let mut device = match Device::find_by_refresh_token(&token, &conn) { Some(device) => device, None => err!("Invalid refresh token"), }; @@ -48,19 +48,19 @@ fn _refresh_login(data: ConnectData, _device_type: DeviceType, conn: DbConn) -> let (access_token, expires_in) = device.refresh_tokens(&user, orgs); match device.save(&conn) { - Ok(()) => Ok(Json(json!({ - "access_token": access_token, - "expires_in": expires_in, - "token_type": "Bearer", - "refresh_token": device.refresh_token, - "Key": user.key, - "PrivateKey": user.private_key, - }))), - Err(_) => err!("Failed to add device to user") + Ok(()) => Ok(Json(json!({ + "access_token": access_token, + "expires_in": expires_in, + "token_type": "Bearer", + "refresh_token": device.refresh_token, + "Key": user.key, + "PrivateKey": user.private_key, + }))), + Err(_) => err!("Failed to add device to user"), } } -fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, remote: Option) -> JsonResult { +fn _password_login(data: ConnectData, conn: DbConn, remote: Option) -> JsonResult { // Get the ip for error reporting let ip = match remote { Some(ip) => ip.ip(), @@ -68,13 +68,13 @@ fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, rem }; // Validate scope - let scope = data.get("scope"); + let scope = data.scope.as_ref().unwrap(); if scope != "api offline_access" { err!("Scope not supported") } // Get the user - let username = data.get("username"); + let username = data.username.as_ref().unwrap(); let user = match User::find_by_mail(username, &conn) { Some(user) => user, None => err!(format!( @@ -84,7 +84,7 @@ fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, rem }; // Check password - let password = data.get("password"); + let password = data.password.as_ref().unwrap(); if !user.check_valid_password(password) { err!(format!( "Username or password is incorrect. Try again. IP: {}. Username: {}.", @@ -92,17 +92,9 @@ fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, rem )) } - // Let's only use the header and ignore the 'devicetype' parameter - let device_type_num = device_type.0; - - let (device_id, device_name) = if data.is_device { - ( - data.get("deviceidentifier").clone(), - data.get("devicename").clone(), - ) - } else { - (format!("web-{}", user.uuid), String::from("web")) - }; + let device_type: i32 = util::try_parse_string(data.device_type.as_ref()).expect("Invalid type"); + let device_id = data.device_identifier.clone().expect("Missing device id"); + let device_name = data.device_name.clone().expect("Missing device name"); // Find device or create new let mut device = match Device::find_by_uuid(&device_id, &conn) { @@ -110,8 +102,8 @@ fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, rem // Check if valid device if device.user_uuid != user.uuid { match device.delete(&conn) { - Ok(()) => Device::new(device_id, user.uuid.clone(), device_name, device_type_num), - Err(_) => err!("Tried to delete device not owned by user, but failed") + Ok(()) => Device::new(device_id, user.uuid.clone(), device_name, device_type), + Err(_) => err!("Tried to delete device not owned by user, but failed"), } } else { device @@ -119,11 +111,11 @@ fn _password_login(data: ConnectData, device_type: DeviceType, conn: DbConn, rem } None => { // Create new device - Device::new(device_id, user.uuid.clone(), device_name, device_type_num) + Device::new(device_id, user.uuid.clone(), device_name, device_type) } }; - let twofactor_token = twofactor_auth(&user.uuid, &data, &mut device, &conn)?; + let twofactor_token = twofactor_auth(&user.uuid, &data.clone(), &mut device, &conn)?; // Common let user = User::find_by_uuid(&device.user_uuid, &conn).unwrap(); @@ -168,13 +160,10 @@ fn twofactor_auth( return Ok(None); } - let provider = match util::try_parse_string(data.get_opt("twoFactorProvider")) { - Some(provider) => provider, - None => providers[0], // If we aren't given a two factor provider, asume the first one - }; + let provider = data.two_factor_provider.unwrap_or(providers[0]); // If we aren't given a two factor provider, asume the first one - let twofactor_code = match data.get_opt("twoFactorToken") { - Some(code) => code, + let twofactor_code = match data.two_factor_token { + Some(ref code) => code, None => err_json!(_json_err_twofactor(&providers, user_uuid, conn)?), }; @@ -182,8 +171,8 @@ fn twofactor_auth( match TwoFactorType::from_i32(provider) { Some(TwoFactorType::Remember) => { - match &device.twofactor_remember { - Some(remember) if remember == twofactor_code => return Ok(None), // No twofactor token needed here + match device.twofactor_remember { + Some(ref remember) if remember == twofactor_code => return Ok(None), // No twofactor token needed here _ => err_json!(_json_err_twofactor(&providers, user_uuid, conn)?), } } @@ -207,13 +196,13 @@ fn twofactor_auth( Some(TwoFactorType::U2f) => { use api::core::two_factor; - two_factor::validate_u2f_login(user_uuid, twofactor_code, conn)?; + two_factor::validate_u2f_login(user_uuid, &twofactor_code, conn)?; } _ => err!("Invalid two factor provider"), } - if util::try_parse_string_or(data.get_opt("twoFactorRemember"), 0) == 1 { + if data.two_factor_remember.unwrap_or(0) == 1 { Ok(Some(device.refresh_twofactor_remember())) } else { device.delete_twofactor_remember(); @@ -271,91 +260,63 @@ fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &DbConn) -> Api Ok(result) } -#[derive(Clone, Copy)] -struct DeviceType(i32); - -impl<'a, 'r> FromRequest<'a, 'r> for DeviceType { - type Error = &'static str; - - fn from_request(request: &'a Request<'r>) -> request::Outcome { - let headers = request.headers(); - let type_opt = headers.get_one("Device-Type"); - let type_num = util::try_parse_string_or(type_opt, 0); - - Outcome::Success(DeviceType(type_num)) - } -} - -#[derive(Debug)] +#[derive(FromForm, Debug, Clone)] +#[allow(non_snake_case)] struct ConnectData { grant_type: GrantType, - is_device: bool, - data: HashMap, + + // Needed for grant_type="refresh_token" + refresh_token: Option, + + // Needed for grant_type="password" + client_id: Option, // web, cli, desktop, browser, mobile + password: Option, + scope: Option, + username: Option, + + #[form(field = "deviceIdentifier")] + device_identifier: Option, + #[form(field = "deviceName")] + device_name: Option, + #[form(field = "deviceType")] + device_type: Option, + + // Needed for two-factor auth + #[form(field = "twoFactorProvider")] + two_factor_provider: Option, + #[form(field = "twoFactorToken")] + two_factor_token: Option, + #[form(field = "twoFactorRemember")] + two_factor_remember: Option, } -#[derive(Debug, Copy, Clone)] +#[derive(FromFormValue, Debug, Clone, Copy)] +#[allow(non_camel_case_types)] enum GrantType { - RefreshToken, - Password, + refresh_token, + password, } -impl ConnectData { - fn get(&self, key: &str) -> &String { - &self.data[&key.to_lowercase()] - } - - fn get_opt(&self, key: &str) -> Option<&String> { - self.data.get(&key.to_lowercase()) - } -} - -const VALUES_REFRESH: [&str; 1] = ["refresh_token"]; -const VALUES_PASSWORD: [&str; 5] = ["client_id", "grant_type", "password", "scope", "username"]; -const VALUES_DEVICE: [&str; 3] = ["deviceidentifier", "devicename", "devicetype"]; - -impl<'f> FromForm<'f> for ConnectData { - type Error = String; - - fn from_form(items: &mut FormItems<'f>, _strict: bool) -> Result { - let mut data = HashMap::new(); - - // Insert data into map - for item in items { - let (key, value) = item.key_value_decoded(); - data.insert(key.to_lowercase(), value); +fn validate_data(data: &ConnectData) -> EmptyResult { + match data.grant_type { + GrantType::refresh_token => { + _check_is_some(&data.refresh_token, "refresh_token cannot be blank") } - - // Validate needed values - let (grant_type, is_device) = match data.get("grant_type").map(String::as_ref) { - Some("refresh_token") => { - check_values(&data, &VALUES_REFRESH)?; - (GrantType::RefreshToken, false) // Device doesn't matter here - } - Some("password") => { - check_values(&data, &VALUES_PASSWORD)?; - - let is_device = match data["client_id"].as_ref() { - "browser" | "mobile" => check_values(&data, &VALUES_DEVICE)?, - _ => false, - }; - (GrantType::Password, is_device) - } - _ => return Err("Grant type not supported".to_string()), - }; - - Ok(ConnectData { - grant_type, - is_device, - data, - }) - } -} - -fn check_values(map: &HashMap, values: &[&str]) -> Result { - for value in values { - if !map.contains_key(*value) { - return Err(format!("{} cannot be blank", value)); + GrantType::password => { + _check_is_some(&data.client_id, "client_id cannot be blank")?; + _check_is_some(&data.password, "password cannot be blank")?; + _check_is_some(&data.scope, "scope cannot be blank")?; + _check_is_some(&data.username, "username cannot be blank")?; + _check_is_some(&data.device_identifier, "device_identifier cannot be blank")?; + _check_is_some(&data.device_name, "device_name cannot be blank")?; + _check_is_some(&data.device_type, "device_type cannot be blank") } } - Ok(true) +} + +fn _check_is_some(value: &Option, msg: &str) -> EmptyResult { + if value.is_none() { + err!(msg) + } + Ok(()) } From e844f41abcb4b78db1f4a08ab1378fa843a536d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 1 Nov 2018 00:07:03 +0100 Subject: [PATCH 03/24] Make the docker images use port 80 (instead of 8000, which is the default in rocket 0.4) --- Dockerfile | 1 + Dockerfile.aarch64 | 1 + Dockerfile.alpine | 1 + Dockerfile.armv7 | 1 + 4 files changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2a70f17d..f795a86b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,7 @@ RUN cargo build --release FROM debian:stretch-slim ENV ROCKET_ENV "staging" +ENV ROCKET_PORT=80 ENV ROCKET_WORKERS=10 # Install needed libraries diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 77bea2d3..2eb68221 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -83,6 +83,7 @@ RUN cargo build --release --target=aarch64-unknown-linux-gnu -v FROM resin/aarch64-debian:stretch ENV ROCKET_ENV "staging" +ENV ROCKET_PORT=80 ENV ROCKET_WORKERS=10 RUN [ "cross-build-start" ] diff --git a/Dockerfile.alpine b/Dockerfile.alpine index edcfd59a..03cc09d2 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -56,6 +56,7 @@ RUN cargo build --release FROM alpine:3.8 ENV ROCKET_ENV "staging" +ENV ROCKET_PORT=80 ENV ROCKET_WORKERS=10 ENV SSL_CERT_DIR=/etc/ssl/certs diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index 2712ae65..e6348297 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -83,6 +83,7 @@ RUN cargo build --release --target=armv7-unknown-linux-gnueabihf -v FROM resin/armv7hf-debian:stretch ENV ROCKET_ENV "staging" +ENV ROCKET_PORT=80 ENV ROCKET_WORKERS=10 RUN [ "cross-build-start" ] From 9b20247fc2cbeb95391be27f503e6f7f775b54f7 Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Sat, 3 Nov 2018 18:54:36 +0100 Subject: [PATCH 04/24] Remove libs from Dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f795a86b..10b99ca2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,6 @@ WORKDIR /app # Copies over *only* your manifests and vendored dependencies COPY ./Cargo.* ./ -COPY ./libs ./libs COPY ./rust-toolchain ./rust-toolchain # Builds your dependencies and removes the From f408efc92764b975bf21ddcf5376b1e4d3e871b3 Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Sat, 3 Nov 2018 18:56:41 +0100 Subject: [PATCH 05/24] Also remove libs from other platforms Dockerfiles --- Dockerfile.aarch64 | 1 - Dockerfile.alpine | 1 - Dockerfile.armv7 | 1 - 3 files changed, 3 deletions(-) diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2eb68221..4d0351ad 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -45,7 +45,6 @@ WORKDIR /app # Copies over *only* your manifests and vendored dependencies COPY ./Cargo.* ./ -COPY ./libs ./libs COPY ./rust-toolchain ./rust-toolchain # Prepare openssl arm64 libs diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 03cc09d2..85d9d055 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -33,7 +33,6 @@ RUN USER=root cargo init --bin # Copies over *only* your manifests and vendored dependencies COPY ./Cargo.* ./ -COPY ./libs ./libs COPY ./rust-toolchain ./rust-toolchain # Builds your dependencies and removes the diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index e6348297..95bbabfc 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -45,7 +45,6 @@ WORKDIR /app # Copies over *only* your manifests and vendored dependencies COPY ./Cargo.* ./ -COPY ./libs ./libs COPY ./rust-toolchain ./rust-toolchain # Prepare openssl armhf libs From 6eb1c3d63827bc5ab3cf641d743129b155b3ef02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 6 Nov 2018 16:53:34 +0100 Subject: [PATCH 06/24] Fixed change in organizations header, now Request::get_param() are indexed by segment, not dynamic parameter. --- src/auth.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth.rs b/src/auth.rs index cc28b3ba..0bc95ee5 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -195,8 +195,8 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { Outcome::Forward(f) => Outcome::Forward(f), Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { - // org_id is expected to be the first dynamic param - match request.get_param::(0) { + // org_id is expected to be the second param ("/organizations/") + match request.get_param::(1) { Some(Ok(org_id)) => { let conn = match request.guard::() { Outcome::Success(conn) => conn, From a4550e51ea2425e65c6aab7118398a349301acf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Mon, 19 Nov 2018 20:21:02 +0100 Subject: [PATCH 07/24] Update dependencies and add /ciphers/create --- Cargo.toml | 6 +++--- rust-toolchain | 2 +- src/api/core/ciphers.rs | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a91405f0..e69fb7ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Daniel García "] [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. -rocket = { version = "0.4.0-rc.1", features = ["tls"] } +rocket = { version = "0.4.0-rc.1", features = ["tls"], default-features = false } rocket_contrib = "0.4.0-rc.1" # HTTP client @@ -57,13 +57,13 @@ jsonwebtoken = "5.0.1" u2f = "0.1.2" # Yubico Library -yubico= { version = "=0.4.0", default-features = false } +yubico = { version = "=0.4.0", default-features = false } # A `dotenv` implementation for Rust dotenv = { version = "0.13.0", default-features = false } # Lazy static macro -lazy_static = "1.2.0" +lazy_static = { version = "1.2.0", features = ["nightly"] } # Numerical libraries num-traits = "0.2.6" diff --git a/rust-toolchain b/rust-toolchain index 0147c3ef..51ddc680 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-10-31 +nightly-2018-11-19 diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 0103c6ee..ef5414d9 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -32,6 +32,7 @@ pub fn routes() -> Vec { post_ciphers, put_cipher_admin, post_ciphers_admin, + post_ciphers_create, post_ciphers_import, post_attachment, post_attachment_admin, @@ -175,7 +176,11 @@ fn post_ciphers_admin(data: JsonUpcase, headers: Headers, conn: }; share_cipher_by_uuid(&cipher.uuid, data, &headers, &conn, &ws) +} +#[post("/ciphers/create", data = "")] +fn post_ciphers_create(data: JsonUpcase, headers: Headers, conn: DbConn, ws: State) -> JsonResult { + post_ciphers_admin(data, headers, conn, ws) } #[post("/ciphers", data = "")] From f71f10eac6f9111217e9ed8016ce9baf9b06804e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sat, 24 Nov 2018 23:00:41 +0100 Subject: [PATCH 08/24] Implemented key rotation with the latest vault --- src/api/core/accounts.rs | 122 +++++++++++++++++++++++++++++++-------- src/api/core/ciphers.rs | 2 +- src/db/models/user.rs | 1 - src/main.rs | 2 +- 4 files changed, 100 insertions(+), 27 deletions(-) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index aad95d15..ce8572b7 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -1,15 +1,15 @@ use rocket_contrib::json::Json; -use db::DbConn; use db::models::*; +use db::DbConn; -use api::{PasswordData, JsonResult, EmptyResult, JsonUpcase, NumberOrString}; +use api::{EmptyResult, JsonResult, JsonUpcase, NumberOrString, PasswordData, UpdateType, WebSocketUsers}; use auth::Headers; use mail; use CONFIG; -use rocket::Route; +use rocket::{Route, State}; pub fn routes() -> Vec { routes![ @@ -21,6 +21,7 @@ pub fn routes() -> Vec { post_keys, post_password, post_kdf, + post_rotatekey, post_sstamp, post_email_token, post_email, @@ -56,23 +57,22 @@ struct KeysData { fn register(data: JsonUpcase, conn: DbConn) -> EmptyResult { let data: RegisterData = data.into_inner().data; - let mut user = match User::find_by_mail(&data.Email, &conn) { - Some(mut user) => { + Some(user) => { if Invitation::take(&data.Email, &conn) { for mut user_org in UserOrganization::find_invited_by_user(&user.uuid, &conn).iter_mut() { user_org.status = UserOrgStatus::Accepted as i32; if user_org.save(&conn).is_err() { err!("Failed to accept user to organization") } - }; + } user } else if CONFIG.signups_allowed { - err!("Account with this email already exists") + err!("Account with this email already exists") } else { - err!("Registration not allowed") + err!("Registration not allowed") } - }, + } None => { if CONFIG.signups_allowed || Invitation::take(&data.Email, &conn) { User::new(data.Email) @@ -109,7 +109,7 @@ fn register(data: JsonUpcase, conn: DbConn) -> EmptyResult { match user.save(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed to save user") + Err(_) => err!("Failed to save user"), } } @@ -122,7 +122,7 @@ fn profile(headers: Headers, conn: DbConn) -> JsonResult { #[allow(non_snake_case)] struct ProfileData { #[serde(rename = "Culture")] - _Culture: String, // Ignored, always use en-US + _Culture: String, // Ignored, always use en-US MasterPasswordHint: Option, Name: String, } @@ -145,7 +145,7 @@ fn post_profile(data: JsonUpcase, headers: Headers, conn: DbConn) - }; match user.save(&conn) { Ok(()) => Ok(Json(user.to_json(&conn))), - Err(_) => err!("Failed to save user profile") + Err(_) => err!("Failed to save user profile"), } } @@ -153,7 +153,7 @@ fn post_profile(data: JsonUpcase, headers: Headers, conn: DbConn) - fn get_public_keys(uuid: String, _headers: Headers, conn: DbConn) -> JsonResult { let user = match User::find_by_uuid(&uuid, &conn) { Some(user) => user, - None => err!("User doesn't exist") + None => err!("User doesn't exist"), }; Ok(Json(json!({ @@ -174,12 +174,10 @@ fn post_keys(data: JsonUpcase, headers: Headers, conn: DbConn) -> Json match user.save(&conn) { Ok(()) => Ok(Json(user.to_json(&conn))), - Err(_) => err!("Failed to save the user's keys") + Err(_) => err!("Failed to save the user's keys"), } } - - #[derive(Deserialize)] #[allow(non_snake_case)] struct ChangePassData { @@ -201,7 +199,7 @@ fn post_password(data: JsonUpcase, headers: Headers, conn: DbCon user.key = data.Key; match user.save(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed to save password") + Err(_) => err!("Failed to save password"), } } @@ -231,10 +229,86 @@ fn post_kdf(data: JsonUpcase, headers: Headers, conn: DbConn) -> user.key = data.Key; match user.save(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed to save password settings") + Err(_) => err!("Failed to save password settings"), } } +#[derive(Deserialize)] +#[allow(non_snake_case)] +struct UpdateFolderData { + Id: String, + Name: String, +} + +use super::ciphers::CipherData; + +#[derive(Deserialize)] +#[allow(non_snake_case)] +struct KeyData { + Ciphers: Vec, + Folders: Vec, + Key: String, + PrivateKey: String, + MasterPasswordHash: String, +} + +#[post("/accounts/key", data = "")] +fn post_rotatekey(data: JsonUpcase, headers: Headers, conn: DbConn, ws: State) -> EmptyResult { + let data: KeyData = data.into_inner().data; + + if !headers.user.check_valid_password(&data.MasterPasswordHash) { + err!("Invalid password") + } + + let user_uuid = &headers.user.uuid; + + // Update folder data + for folder_data in data.Folders { + let mut saved_folder = match Folder::find_by_uuid(&folder_data.Id, &conn) { + Some(folder) => folder, + None => err!("Folder doesn't exist"), + }; + + if &saved_folder.user_uuid != user_uuid { + err!("The folder is not owned by the user") + } + + saved_folder.name = folder_data.Name; + if saved_folder.save(&conn).is_err() { + err!("Failed to save folder") + } + } + + // Update cipher data + use super::ciphers::update_cipher_from_data; + + for cipher_data in data.Ciphers { + let mut saved_cipher = match Cipher::find_by_uuid(cipher_data.Id.as_ref().unwrap(), &conn) { + Some(cipher) => cipher, + None => err!("Cipher doesn't exist"), + }; + + if saved_cipher.user_uuid.as_ref().unwrap() != user_uuid { + err!("The cipher is not owned by the user") + } + + update_cipher_from_data(&mut saved_cipher, cipher_data, &headers, false, &conn, &ws, UpdateType::SyncCipherUpdate)? + } + + // Update user data + let mut user = headers.user; + + user.key = data.Key; + user.private_key = Some(data.PrivateKey); + user.reset_security_stamp(); + + if user.save(&conn).is_err() { + err!("Failed modify user key"); + } + + Ok(()) +} + #[post("/accounts/security-stamp", data = "")] fn post_sstamp(data: JsonUpcase, headers: Headers, conn: DbConn) -> EmptyResult { let data: PasswordData = data.into_inner().data; @@ -247,7 +321,7 @@ fn post_sstamp(data: JsonUpcase, headers: Headers, conn: DbConn) - user.reset_security_stamp(); match user.save(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed to reset security stamp") + Err(_) => err!("Failed to reset security stamp"), } } @@ -278,7 +352,7 @@ fn post_email_token(data: JsonUpcase, headers: Headers, conn: Db struct ChangeEmailData { MasterPasswordHash: String, NewEmail: String, - + Key: String, NewMasterPasswordHash: String, #[serde(rename = "Token")] @@ -299,13 +373,13 @@ fn post_email(data: JsonUpcase, headers: Headers, conn: DbConn) } user.email = data.NewEmail; - + user.set_password(&data.NewMasterPasswordHash); user.key = data.Key; match user.save(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed to save email address") + Err(_) => err!("Failed to save email address"), } } @@ -322,10 +396,10 @@ fn delete_account(data: JsonUpcase, headers: Headers, conn: DbConn if !user.check_valid_password(&data.MasterPasswordHash) { err!("Invalid password") } - + match user.delete(&conn) { Ok(()) => Ok(()), - Err(_) => err!("Failed deleting user account, are you the only owner of some organization?") + Err(_) => err!("Failed deleting user account, are you the only owner of some organization?"), } } diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index ef5414d9..f812babc 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -136,7 +136,7 @@ fn get_cipher_details(uuid: String, headers: Headers, conn: DbConn) -> JsonResul #[allow(non_snake_case)] pub struct CipherData { // Id is optional as it is included only in bulk share - Id: Option, + pub Id: Option, // Folder id is not included in import FolderId: Option, // TODO: Some of these might appear all the time, no need for Option diff --git a/src/db/models/user.rs b/src/db/models/user.rs index 1e6f88b7..c958a516 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -97,7 +97,6 @@ impl User { self.password_hash = crypto::hash_password(password.as_bytes(), &self.salt, self.password_iterations as u32); - self.reset_security_stamp(); } pub fn reset_security_stamp(&mut self) { diff --git a/src/main.rs b/src/main.rs index b7eca415..560d77c3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![feature(proc_macro_hygiene, decl_macro, custom_derive, vec_remove_item, try_trait)] +#![feature(proc_macro_hygiene, decl_macro, custom_derive, vec_remove_item, try_trait, nll)] #![recursion_limit="128"] #![allow(proc_macro_derive_resolution_fallback)] // TODO: Remove this when diesel update fixes warnings From 6364c0578989d8ad374f91e98edee66352dbf553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 27 Nov 2018 17:24:12 +0100 Subject: [PATCH 09/24] Fix attachments during key rotation, add individual attachment key --- .../down.sql | 0 .../up.sql | 3 + src/api/core/ciphers.rs | 112 +++++++++++++----- src/db/models/attachment.rs | 7 +- src/db/models/device.rs | 1 - src/db/schema.rs | 1 + 6 files changed, 89 insertions(+), 35 deletions(-) create mode 100644 migrations/2018-11-27-152651_add_att_key_columns/down.sql create mode 100644 migrations/2018-11-27-152651_add_att_key_columns/up.sql diff --git a/migrations/2018-11-27-152651_add_att_key_columns/down.sql b/migrations/2018-11-27-152651_add_att_key_columns/down.sql new file mode 100644 index 00000000..e69de29b diff --git a/migrations/2018-11-27-152651_add_att_key_columns/up.sql b/migrations/2018-11-27-152651_add_att_key_columns/up.sql new file mode 100644 index 00000000..4a73a8c9 --- /dev/null +++ b/migrations/2018-11-27-152651_add_att_key_columns/up.sql @@ -0,0 +1,3 @@ +ALTER TABLE attachments + ADD COLUMN + key TEXT; \ No newline at end of file diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index f812babc..d148017f 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use std::collections::{HashSet, HashMap}; use std::path::Path; use rocket::http::ContentType; @@ -162,6 +162,18 @@ pub struct CipherData { Favorite: Option, PasswordHistory: Option, + + // These are used during key rotation + #[serde(rename = "Attachments")] + _Attachments: Option, // Unused, contains map of {id: filename} + Attachments2: Option> +} + +#[derive(Deserialize, Debug)] +#[allow(non_snake_case)] +pub struct Attachments2Data { + FileName: String, + Key: String, } #[post("/ciphers/admin", data = "")] @@ -221,6 +233,28 @@ pub fn update_cipher_from_data(cipher: &mut Cipher, data: CipherData, headers: & } } + // Modify attachments name and keys when rotating + if let Some(attachments) = data.Attachments2 { + for (id, attachment) in attachments { + let mut saved_att = match Attachment::find_by_id(&id, &conn) { + Some(att) => att, + None => err!("Attachment doesn't exist") + }; + + if saved_att.cipher_uuid != cipher.uuid { + err!("Attachment is not owned by the cipher") + } + + saved_att.key = Some(attachment.Key); + saved_att.file_name = attachment.FileName; + + match saved_att.save(&conn) { + Ok(()) => (), + Err(_) => err!("Failed to save attachment") + }; + } + } + let type_data_opt = match data.Type { 1 => data.Login, 2 => data.SecureNote, @@ -252,7 +286,7 @@ pub fn update_cipher_from_data(cipher: &mut Cipher, data: CipherData, headers: & match cipher.save(&conn) { Ok(()) => (), - Err(_) => println!("Error: Failed to save cipher") + Err(_) => err!("Failed to save cipher") }; ws.send_cipher_update(ut, &cipher, &cipher.update_users_revision(&conn)); @@ -299,7 +333,6 @@ fn post_ciphers_import(data: JsonUpcase, headers: Headers, conn: DbC } // Read the relations between folders and ciphers - use std::collections::HashMap; let mut relations_map = HashMap::new(); for relation in data.FolderRelationships { @@ -542,37 +575,52 @@ fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers let base_path = Path::new(&CONFIG.attachments_folder).join(&cipher.uuid); + let mut attachment_key = None; + Multipart::with_body(data.open(), boundary).foreach_entry(|mut field| { - // This is provided by the client, don't trust it - let name = field.headers.filename.expect("No filename provided"); - - let file_name = HEXLOWER.encode(&crypto::get_random(vec![0; 10])); - let path = base_path.join(&file_name); - - let size = match field.data.save() - .memory_threshold(0) - .size_limit(None) - .with_path(path) { - SaveResult::Full(SavedData::File(_, size)) => size as i32, - SaveResult::Full(other) => { - println!("Attachment is not a file: {:?}", other); - return; + match field.headers.name.as_str() { + "key" => { + use std::io::Read; + let mut key_buffer = String::new(); + if field.data.read_to_string(&mut key_buffer).is_ok() { + attachment_key = Some(key_buffer); + } }, - SaveResult::Partial(_, reason) => { - println!("Partial result: {:?}", reason); - return; - }, - SaveResult::Error(e) => { - println!("Error: {:?}", e); - return; - } - }; + "data" => { + // This is provided by the client, don't trust it + let name = field.headers.filename.expect("No filename provided"); - let attachment = Attachment::new(file_name, cipher.uuid.clone(), name, size); - match attachment.save(&conn) { - Ok(()) => (), - Err(_) => println!("Error: failed to save attachment") - }; + let file_name = HEXLOWER.encode(&crypto::get_random(vec![0; 10])); + let path = base_path.join(&file_name); + + let size = match field.data.save() + .memory_threshold(0) + .size_limit(None) + .with_path(path) { + SaveResult::Full(SavedData::File(_, size)) => size as i32, + SaveResult::Full(other) => { + println!("Attachment is not a file: {:?}", other); + return; + }, + SaveResult::Partial(_, reason) => { + println!("Partial result: {:?}", reason); + return; + }, + SaveResult::Error(e) => { + println!("Error: {:?}", e); + return; + } + }; + + let mut attachment = Attachment::new(file_name, cipher.uuid.clone(), name, size); + attachment.key = attachment_key.clone(); + match attachment.save(&conn) { + Ok(()) => (), + Err(_) => println!("Error: failed to save attachment") + }; + }, + _ => println!("Error: invalid multipart name") + } }).expect("Error processing multipart data"); Ok(Json(cipher.to_json(&headers.host, &headers.user.uuid, &conn))) @@ -793,6 +841,6 @@ fn _delete_cipher_attachment_by_id(uuid: &str, attachment_id: &str, headers: &He ws.send_cipher_update(UpdateType::SyncCipherDelete, &cipher, &cipher.update_users_revision(&conn)); Ok(()) } - Err(_) => err!("Deleting attachement failed") + Err(_) => err!("Deleting attachment failed") } } diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index 4e2038dc..97a4d753 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -12,6 +12,7 @@ pub struct Attachment { pub cipher_uuid: String, pub file_name: String, pub file_size: i32, + pub key: Option } /// Local methods @@ -22,6 +23,7 @@ impl Attachment { cipher_uuid, file_name, file_size, + key: None } } @@ -41,6 +43,7 @@ impl Attachment { "FileName": self.file_name, "Size": self.file_size.to_string(), "SizeName": display_size, + "Key": self.key, "Object": "attachment" }) } @@ -92,8 +95,8 @@ impl Attachment { } pub fn delete_all_by_cipher(cipher_uuid: &str, conn: &DbConn) -> QueryResult<()> { - for attachement in Attachment::find_by_cipher(&cipher_uuid, &conn) { - attachement.delete(&conn)?; + for attachment in Attachment::find_by_cipher(&cipher_uuid, &conn) { + attachment.delete(&conn)?; } Ok(()) } diff --git a/src/db/models/device.rs b/src/db/models/device.rs index 22b26e50..ca998378 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -71,7 +71,6 @@ impl Device { let time_now = Utc::now().naive_utc(); self.updated_at = time_now; - let orgowner: Vec<_> = orgs.iter().filter(|o| o.type_ == 0).map(|o| o.org_uuid.clone()).collect(); let orgadmin: Vec<_> = orgs.iter().filter(|o| o.type_ == 1).map(|o| o.org_uuid.clone()).collect(); let orguser: Vec<_> = orgs.iter().filter(|o| o.type_ == 2).map(|o| o.org_uuid.clone()).collect(); diff --git a/src/db/schema.rs b/src/db/schema.rs index 49880fe5..48168537 100644 --- a/src/db/schema.rs +++ b/src/db/schema.rs @@ -4,6 +4,7 @@ table! { cipher_uuid -> Text, file_name -> Text, file_size -> Integer, + key -> Nullable, } } From e177160ee946171e4938e99019116a7b900a1e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 27 Nov 2018 17:29:09 +0100 Subject: [PATCH 10/24] Update web vault to 2.6.0 --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.alpine | 2 +- Dockerfile.armv7 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fb8b0f8..3d375a7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.5.0" +ENV VAULT_VERSION "v2.6.0" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 749f9d72..b76e8e8c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.5.0" +ENV VAULT_VERSION "v2.6.0" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 5be859ce..6eb9604c 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.5.0" +ENV VAULT_VERSION "v2.6.0" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index 6e6a6855..465c610f 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.5.0" +ENV VAULT_VERSION "v2.6.0" ENV URL "https://github.com/bitwarden/web.git" From 8b5d97790fd2d2f3767d6f58537f31a25e5a5c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sat, 1 Dec 2018 14:29:19 +0100 Subject: [PATCH 11/24] Updated rocket to rc2 and rest of dependencies --- Cargo.lock | 409 ++++++++++++++++++++++--------------------------- Cargo.toml | 6 +- rust-toolchain | 2 +- 3 files changed, 185 insertions(+), 232 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0406cf45..c8943337 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -41,7 +41,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -52,7 +52,7 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -98,7 +98,7 @@ dependencies = [ "lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "multipart 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", + "multipart 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -106,8 +106,8 @@ dependencies = [ "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_contrib 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_contrib 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -119,12 +119,11 @@ dependencies = [ [[package]] name = "buf_redux" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slice-deque 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -132,11 +131,6 @@ name = "bufstream" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "build_const" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byte-tools" version = "0.1.3" @@ -220,7 +214,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -228,15 +222,15 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "crc" -version = "1.8.1" +name = "crc32fast" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -253,7 +247,7 @@ name = "crossbeam-epoch" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -261,11 +255,6 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-utils" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "crossbeam-utils" version = "0.6.1" @@ -290,31 +279,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "devise" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "devise_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "devise_codegen" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "devise_core" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -372,7 +361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -453,7 +442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -475,7 +464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -498,8 +487,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -527,7 +516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -535,7 +524,7 @@ name = "fsevent-sys" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -594,11 +583,11 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -617,13 +606,13 @@ name = "hostname" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -656,27 +645,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -698,7 +687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -726,10 +715,10 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -737,7 +726,7 @@ name = "inotify-sys" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -745,7 +734,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -770,8 +759,8 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -854,17 +843,17 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.43" +version = "0.2.44" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libflate" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -902,14 +891,6 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "mach" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "matches" version = "0.1.8" @@ -921,7 +902,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -996,7 +977,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1021,7 +1002,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1043,17 +1024,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "multipart" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "buf_redux 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "buf_redux 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "iron 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nickel 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nickel 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1077,7 +1058,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1085,7 +1066,7 @@ dependencies = [ "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1094,13 +1075,13 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nickel" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1110,7 +1091,7 @@ dependencies = [ "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "mustache 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1141,7 +1122,7 @@ dependencies = [ "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1156,7 +1137,7 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1185,7 +1166,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1209,7 +1190,7 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1224,7 +1205,7 @@ version = "0.9.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1266,9 +1247,9 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1277,10 +1258,10 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1299,7 +1280,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1415,7 +1396,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1425,7 +1406,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1436,23 +1417,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1491,7 +1472,7 @@ dependencies = [ [[package]] name = "rand_isaac" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1516,44 +1497,24 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.2.11" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1574,12 +1535,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1587,7 +1548,7 @@ dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1600,7 +1561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1624,52 +1585,52 @@ dependencies = [ [[package]] name = "rocket" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_codegen 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_codegen 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_codegen" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "devise 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_contrib" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_http" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1679,7 +1640,7 @@ dependencies = [ "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1691,7 +1652,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1794,7 +1755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1804,7 +1765,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1832,7 +1793,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1895,19 +1856,9 @@ name = "slab" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "slice-deque" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "smallvec" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1925,7 +1876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1950,7 +1901,7 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.21" +version = "0.15.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1973,7 +1924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1988,13 +1939,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2004,8 +1955,8 @@ name = "thread-id" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2030,8 +1981,8 @@ name = "time" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2050,23 +2001,24 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2081,7 +2033,7 @@ dependencies = [ [[package]] name = "tokio-current-thread" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2103,7 +2055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2118,10 +2070,10 @@ dependencies = [ [[package]] name = "tokio-reactor" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2143,29 +2095,29 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2173,7 +2125,7 @@ dependencies = [ [[package]] name = "tokio-udp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2182,28 +2134,29 @@ dependencies = [ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2480,6 +2433,11 @@ name = "yansi" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "yansi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "yubico" version = "0.4.0" @@ -2487,7 +2445,7 @@ source = "git+https://github.com/dani-garcia/yubico-rs#a3a8143611f651d1ff6ec9a2d dependencies = [ "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2498,7 +2456,7 @@ dependencies = [ "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc" "checksum ascii 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "97be891acc47ca214468e09425d02cef3af2c94d0d82081cd02061f996802f14" "checksum ascii_utils 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" @@ -2507,9 +2465,8 @@ dependencies = [ "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum buf_redux 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20c6687a26c9ce967594b78038c06139a0d3a5b3005d16572284d543924a01aa" +"checksum buf_redux 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72f25c67abbf523ff8457771622fb731ac4a2391439de33bc60febcdee1749c9" "checksum bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "40e38929add23cdf8a366df9b0e088953150724bcbe5fc330b0d8eb3b328eec8" -"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byte-tools 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0919189ba800c7ffe8778278116b7e0de3905ab81c72abb69c85cbfef7991279" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" @@ -2523,16 +2480,15 @@ dependencies = [ "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" -"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +"checksum crc32fast 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd60857105614c6054705de26d91124e75aad3666f019034035381050f2fd8a4" "checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" "checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" -"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" "checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" "checksum crypto-mac 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dba62c86c26dcba13c278afcaac0c7452486fe604a2668a0dfa4e0edc98d8a9e" "checksum data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67df0571a74bf0d97fb8b2ed22abdd9a48475c96bd327db968b7d9cace99655e" -"checksum devise 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8e7e0601aeb557a7a8f6a4f87d29c8cc0feb2c41d15f5d65900723dabf083b" -"checksum devise_codegen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c88254efd3c2dfbeaf598d0ea35a54ef457ca04e31d214420d086ac9236b436" -"checksum devise_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e33669c00593713cedf755f69723aa0731de7bc1f552903d6df98d6c4f91bcca" +"checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" +"checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" +"checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" "checksum diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "164080ac16a4d1d80a50f0a623e4ddef41cb2779eee85bcc76907d340dfc98cc" "checksum diesel_derives 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03bcaf77491f53e400d5ee3bdd57142ea4e1c47fe9217b3361ff9a76ca0e3d37" "checksum diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b42c35d1ce9e8d57a3e7001b4127f2bc1b073a89708bb7019f5be27c991c28" @@ -2548,7 +2504,7 @@ dependencies = [ "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" -"checksum encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ca20350a7cb5aab5b9034731123d6d412caf3e92d4985e739e411ba0955fd0eb" +"checksum encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1a8fa54e6689eb2549c4efed8d00d7f3b2b994a064555b0e8df4ae3764bcc4be" "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" @@ -2569,10 +2525,10 @@ dependencies = [ "checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum hmac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb5aa9647ba4711e9d6968dc1c810cd23989ed435443ca962e1bf6d8b8b83ff" "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" -"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" +"checksum http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "02096a6d2c55e63f7fcb800690e4f889a25f6ec342e3adb4594e293b625215ab" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2f60ae467ef4fc5eba9a34d31648c9c8ed902faf45a217f6734ce9ea64779ac7" +"checksum hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0aeedb8ca5f0f96be00f84073c6d0d5f962ecad020ef543dff99a7c12717a60e" "checksum hyper-sync-rustls 0.3.0-rc.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d1a443a90413a118ac6739e024f6a5180aa3b3f43f7de65f9d388a961cff19b" "checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" @@ -2590,13 +2546,12 @@ dependencies = [ "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" "checksum lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" +"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" +"checksum libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "bff3ac7d6f23730d3b533c35ed75eef638167634476a499feef16c428d74b57b" "checksum libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d3711dfd91a1081d2458ad2d06ea30a8755256e74038be2ad927d94e1c955ca8" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" -"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" @@ -2611,11 +2566,11 @@ dependencies = [ "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" -"checksum multipart 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bd50d71866514b14d2ca09823d81390d92daa40bc835f83a908c52ab0a802e" +"checksum multipart 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)" = "adba94490a79baf2d6a23eac897157047008272fa3eecb3373ae6377b91eca28" "checksum mustache 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb004e419334fc9172d0a5ff91c0770bdd6239091b0b343eb5926101f0a7d13" "checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nickel 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "22b40e35b9f46a076dcbd8193125cea0e4130b1c015f68655038010f3e826e04" +"checksum nickel 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da8f6d24c912e56ae0b595fed54326dc49e8d7c8a13f303861fd0c2c3021e746" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a" "checksum notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "873ecfd8c174964ae30f401329d140142312c8e5590719cf1199d5f1717d8078" @@ -2653,28 +2608,26 @@ dependencies = [ "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" -"checksum rand 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de3f08319b5395bd19b70e73c4c465329495db02dafeb8ca711a20f1c2bd058c" +"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" "checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_isaac 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6ecfe9ebf36acd47a49d150990b047a5f7db0a7236ee2414b7ff5cc1097c7b" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" "checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" -"checksum redox_syscall 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "cf8fb82a4d1c9b28f1c26c574a5b541f5ffb4315f6c9a791fa47b6a04438fe93" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ee84f70c8c08744ea9641a731c7fadb475bf2ecc52d7f627feb833e0b3990467" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fbc557aac2b708fe84121caf261346cc2eed71978024337e42eb46b8a252ac6e" +"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d" +"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ab52e462d1e15891441aeefadff68bdea005174328ce3da0a314f2ad313ec837" "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rmp 0.8.7 (git+https://github.com/dani-garcia/msgpack-rust)" = "" "checksum rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29af0205707de955a396a1d3c657677c65f791ebabb63c0596c0b2fec0bf6325" -"checksum rocket 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71f9970125ea965ae6e468a5bb878f47762aff210596e4cfc2d4ee9af2365b0f" -"checksum rocket_codegen 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a9adbb359e17dabd05d97aa05a328817a20db5ba6b694cd51bba2900b262691" -"checksum rocket_contrib 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "38cce3e4f0de0b950604c2a5cda4b3d74a7f17c62937cee54f4996b36c2d31a5" -"checksum rocket_http 0.4.0-rc.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2201c854709fd6f8cc7dca9bd7ebbddb10f27e1cdda191f932546c3dcd98d4a6" +"checksum rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eaa997ea8de9b14112aa38b2b6a0ecf3e651ff2c08d2fdf384fa765b5f9c2c98" +"checksum rocket_codegen 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fc68f90452ac88c6c1e02a922a0a23ef0ade08f9af899056d0c919b25fa7768c" +"checksum rocket_contrib 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc6a37cb7a6256efe6648f2d0ab9978c49ab883909ea4fabefb81d7c685d841" +"checksum rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c7d555ce896830602aedf4bce2eec8d64713d45a2492c5a3625c3faa5f719b0f" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" @@ -2702,36 +2655,35 @@ dependencies = [ "checksum sha2 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "84920f9ac881e94e33ec89e1b3dcd36040523a308a92548e01217ce35d8cf6a8" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum slice-deque 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "bf9114aa87a7c0ce55425e175d553fa0bef683c7bb2add185a878a2ff8643529" -"checksum smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "622df2d454c29a4d89b30dc3b27b42d7d90d6b9e587dbf8f67652eb7514da484" +"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" -"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" +"checksum string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98998cced76115b1da46f63388b909d118a37ae0be0f82ad35773d4a4bc9d18d" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" -"checksum syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)" = "816b7af21405b011a23554ea2dc3f6576dc86ca557047c34098c1d741f10f823" +"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" +"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum tiny_http 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a442681f9f72e440be192700eeb2861e4174b9983f16f4877c93a134cb5e5f63" -"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "a7817d4c98cc5be21360b3b37d6036fe9b7aefa5b7a201b7b16ff33423822f7d" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" +"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" "checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" "checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" "checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" -"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" +"checksum tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "502b625acb4ee13cbb3b90b8ca80e0addd263ddacf6931666ef751e610b07fb5" "checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" -"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" -"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" -"checksum toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2ecc31b0351ea18b3fe11274b8db6e4d82bce861bbb22e6dbed40417902c65" +"checksum tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "56c5556262383032878afad66943926a1d1f0967f17e94bd7764ceceb3b70e7f" +"checksum tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f37f0111d76cc5da132fe9bc0590b9b9cfd079bc7e75ac3846278430a299ff8" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" +"checksum toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "19782e145d5abefb03758958f06ea35f7b1d8421b534140e0238fd3d0bfd66e3" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" @@ -2769,4 +2721,5 @@ dependencies = [ "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" +"checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" "checksum yubico 0.4.0 (git+https://github.com/dani-garcia/yubico-rs)" = "" diff --git a/Cargo.toml b/Cargo.toml index 05b570b4..d59849a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,14 +5,14 @@ authors = ["Daniel García "] [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. -rocket = { version = "0.4.0-rc.1", features = ["tls"], default-features = false } -rocket_contrib = "0.4.0-rc.1" +rocket = { version = "0.4.0-rc.2", features = ["tls"], default-features = false } +rocket_contrib = "0.4.0-rc.2" # HTTP client reqwest = "0.9.5" # multipart/form-data support -multipart = "0.15.3" +multipart = "0.15.4" # WebSockets library ws = "0.7.9" diff --git a/rust-toolchain b/rust-toolchain index 51ddc680..1b8ece9e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-11-19 +nightly-2018-12-01 From 2129946d14129c75a2afff74fa1608a6941a3176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Mon, 3 Dec 2018 20:28:13 +0100 Subject: [PATCH 12/24] Updated deps and web vault to 2.6.1 --- Cargo.lock | 9 +++------ Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.alpine | 2 +- Dockerfile.armv7 | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8943337..222eab7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,11 +227,8 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "crossbeam-deque" @@ -853,7 +850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2480,7 +2477,7 @@ dependencies = [ "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" -"checksum crc32fast 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd60857105614c6054705de26d91124e75aad3666f019034035381050f2fd8a4" +"checksum crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e685559fa8bccfa46afd0f876047ee5d87c536d71d0c2b3a08cc9e880f73eb" "checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" "checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" "checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" diff --git a/Dockerfile b/Dockerfile index 3d375a7f..5e815393 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.6.0" +ENV VAULT_VERSION "v2.6.1" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6f12838c..03e6dc9a 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.6.0" +ENV VAULT_VERSION "v2.6.1" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index f820e554..3cf6eaf2 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.6.0" +ENV VAULT_VERSION "v2.6.1" ENV URL "https://github.com/bitwarden/web.git" diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index e3943d27..ddabe6cb 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -4,7 +4,7 @@ ####################### VAULT BUILD IMAGE ####################### FROM node:8-alpine as vault -ENV VAULT_VERSION "v2.6.0" +ENV VAULT_VERSION "v2.6.1" ENV URL "https://github.com/bitwarden/web.git" From e34f75c2671b8a7053eb28707a6e48b16e72cd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 4 Dec 2018 13:55:37 +0100 Subject: [PATCH 13/24] Make sure the dockerfile builds the project, instead of assuming the cached dummy is valid --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5e815393..23eec217 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,6 +53,9 @@ RUN find . -not -path "./target*" -delete # To avoid copying unneeded files, use .dockerignore COPY . . +# Make sure that we actually build the project +RUN touch src/main.rs + # Builds again, this time it'll just be # your actual source files being built RUN cargo build --release From dc1bb6de201738b07286acc4b6a778b2372f3276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 6 Dec 2018 16:28:36 +0100 Subject: [PATCH 14/24] Update device push token methods to more closely follow the official server response --- src/api/core/mod.rs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index dcc2821c..d4b4d2e7 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -40,10 +40,8 @@ use db::models::*; use api::{JsonResult, EmptyResult, JsonUpcase}; use auth::Headers; -#[put("/devices/identifier//clear-token", data = "")] -fn clear_device_token(uuid: String, data: JsonUpcase, headers: Headers, conn: DbConn) -> EmptyResult { - let _data: Value = data.into_inner().data; - +#[put("/devices/identifier//clear-token")] +fn clear_device_token(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { let device = match Device::find_by_uuid(&uuid, &conn) { Some(device) => device, None => err!("Device not found") @@ -53,16 +51,16 @@ fn clear_device_token(uuid: String, data: JsonUpcase, headers: Headers, c err!("Device not owned by user") } - match device.delete(&conn) { - Ok(()) => Ok(()), - Err(_) => err!("Failed deleting device") - } + // This only clears push token + // https://github.com/bitwarden/core/blob/master/src/Api/Controllers/DevicesController.cs#L109 + // https://github.com/bitwarden/core/blob/master/src/Core/Services/Implementations/DeviceService.cs#L37 + Ok(()) } #[put("/devices/identifier//token", data = "")] fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers, conn: DbConn) -> JsonResult { let _data: Value = data.into_inner().data; - + let device = match Device::find_by_uuid(&uuid, &conn) { Some(device) => device, None => err!("Device not found") @@ -72,9 +70,17 @@ fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers, con err!("Device not owned by user") } - // TODO: What does this do? + // This should save the push token, but we don't have push functionality - err!("Not implemented") + use util::format_date; + + Ok(Json(json!({ + "Id": device.uuid, + "Name": device.name, + "Type": device.type_, + "Identifier": device.uuid, + "CreationDate": format_date(&device.created_at), + }))) } #[derive(Serialize, Deserialize, Debug)] From 259a2f2982dcc49dd095e8bce368824d2886fd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 6 Dec 2018 20:15:22 +0100 Subject: [PATCH 15/24] Updated rocket to final release --- Cargo.lock | 65 ++++++++++++++++++++++++++++-------------------------- Cargo.toml | 4 ++-- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 222eab7b..0ab6b56a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,8 +106,8 @@ dependencies = [ "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_contrib 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -227,8 +227,11 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "crossbeam-deque" @@ -573,7 +576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "h2" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -642,13 +645,13 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.16" +version = "0.12.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -684,7 +687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.17 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -801,7 +804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -850,7 +853,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -973,7 +976,7 @@ dependencies = [ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -987,7 +990,7 @@ name = "mio-extras" version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1535,7 +1538,7 @@ dependencies = [ "encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.17 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1582,7 +1585,7 @@ dependencies = [ [[package]] name = "rocket" -version = "0.4.0-rc.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1591,43 +1594,43 @@ dependencies = [ "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_codegen 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_codegen" -version = "0.4.0-rc.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_contrib" -version = "0.4.0-rc.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_http" -version = "0.4.0-rc.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2153,7 +2156,7 @@ dependencies = [ [[package]] name = "toml" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2477,7 +2480,7 @@ dependencies = [ "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" -"checksum crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e685559fa8bccfa46afd0f876047ee5d87c536d71d0c2b3a08cc9e880f73eb" +"checksum crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91d5240c6975ef33aeb5f148f35275c25eda8e8a5f95abe421978b05b8bf192" "checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" "checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" "checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" @@ -2519,13 +2522,13 @@ dependencies = [ "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe043cf9b85297937897087de81f590361686e1ac2d4d471b45435de5dfb6a6" "checksum groupable 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" -"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" +"checksum h2 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1ac030ae20dee464c5d0f36544d8b914a6bc606da44a57e052d2b0f5dae129e0" "checksum hmac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb5aa9647ba4711e9d6968dc1c810cd23989ed435443ca962e1bf6d8b8b83ff" "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" "checksum http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "02096a6d2c55e63f7fcb800690e4f889a25f6ec342e3adb4594e293b625215ab" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0aeedb8ca5f0f96be00f84073c6d0d5f962ecad020ef543dff99a7c12717a60e" +"checksum hyper 0.12.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c49a75385d35ff5e9202755f09beb0b878a05c4c363fcc52b23eeb5dcb6782cc" "checksum hyper-sync-rustls 0.3.0-rc.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d1a443a90413a118ac6739e024f6a5180aa3b3f43f7de65f9d388a961cff19b" "checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" @@ -2540,7 +2543,7 @@ dependencies = [ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" -"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" "checksum lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" "checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" @@ -2621,10 +2624,10 @@ dependencies = [ "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rmp 0.8.7 (git+https://github.com/dani-garcia/msgpack-rust)" = "" "checksum rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29af0205707de955a396a1d3c657677c65f791ebabb63c0596c0b2fec0bf6325" -"checksum rocket 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eaa997ea8de9b14112aa38b2b6a0ecf3e651ff2c08d2fdf384fa765b5f9c2c98" -"checksum rocket_codegen 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fc68f90452ac88c6c1e02a922a0a23ef0ade08f9af899056d0c919b25fa7768c" -"checksum rocket_contrib 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc6a37cb7a6256efe6648f2d0ab9978c49ab883909ea4fabefb81d7c685d841" -"checksum rocket_http 0.4.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c7d555ce896830602aedf4bce2eec8d64713d45a2492c5a3625c3faa5f719b0f" +"checksum rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "242154377a85c2a9e036fc31ffc8c200b9e1f22a196e47baa3b57716606ca89d" +"checksum rocket_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d907d6d458c859651c1cf4c8fa99b77685082bde0561db6a4600b365058f710" +"checksum rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f73e161dad5730435f51c815a5c6831d2e57b6b4299b1bf609d31b09aa9a2fa7" +"checksum rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba9d4f2ce5bba6e1b6d3100493bbad63879e99bbf6b4365d61e6f781daab324d" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" @@ -2680,7 +2683,7 @@ dependencies = [ "checksum tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f37f0111d76cc5da132fe9bc0590b9b9cfd079bc7e75ac3846278430a299ff8" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" -"checksum toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "19782e145d5abefb03758958f06ea35f7b1d8421b534140e0238fd3d0bfd66e3" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" diff --git a/Cargo.toml b/Cargo.toml index d59849a1..aa85e6d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ authors = ["Daniel García "] [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. -rocket = { version = "0.4.0-rc.2", features = ["tls"], default-features = false } -rocket_contrib = "0.4.0-rc.2" +rocket = { version = "0.4.0", features = ["tls"], default-features = false } +rocket_contrib = "0.4.0" # HTTP client reqwest = "0.9.5" From 2fde4e693363266a93d450f26ad0b5cc9cebb53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 6 Dec 2018 20:35:25 +0100 Subject: [PATCH 16/24] Implemented proper logging, with support for file logging, timestamp and syslog (this last one is untested) --- .env | 11 +++++ .travis.yml | 2 + Cargo.lock | 34 ++++++++++++++++ Cargo.toml | 8 ++++ src/api/core/ciphers.rs | 12 +++--- src/api/core/two_factor.rs | 8 ++-- src/api/icons.rs | 6 +-- src/api/notifications.rs | 2 +- src/auth.rs | 2 +- src/db/models/attachment.rs | 4 +- src/db/models/user.rs | 2 +- src/main.rs | 80 ++++++++++++++++++++++++++++++++----- src/util.rs | 4 +- 13 files changed, 146 insertions(+), 29 deletions(-) diff --git a/.env b/.env index 0f738939..7ad0e89d 100644 --- a/.env +++ b/.env @@ -18,6 +18,17 @@ # WEBSOCKET_ADDRESS=0.0.0.0 # WEBSOCKET_PORT=3012 +## Enable extended logging +## This shows timestamps and allows logging to file and to syslog +### To enable logging to file, use the LOG_FILE env variable +### To enable syslog, you need to compile with `cargo build --features=enable_syslog' +# EXTENDED_LOGGING=true + +## Logging to file +## This requires extended logging +## It's recommended to also set 'ROCKET_CLI_COLORS=off' +# LOG_FILE=/path/to/log + ## Controls if new users can register # SIGNUPS_ALLOWED=true diff --git a/.travis.yml b/.travis.yml index c37ede59..977b06ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,5 @@ dist: trusty # so we get a VM with higher specs cache: cargo rust: - nightly +script: +- cargo build --verbose --all-features diff --git a/Cargo.lock b/Cargo.lock index 0ab6b56a..e8af51f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,11 +93,13 @@ dependencies = [ "diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fern 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)", "libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multipart 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -111,6 +113,7 @@ dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "syslog 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=75b9fa5afb4c5)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -448,6 +451,14 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "error-chain" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.3" @@ -481,6 +492,15 @@ dependencies = [ "ascii_utils 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fern" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syslog 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "filetime" version = "0.2.4" @@ -1928,6 +1948,17 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syslog" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -2505,10 +2536,12 @@ dependencies = [ "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" "checksum encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1a8fa54e6689eb2549c4efed8d00d7f3b2b994a064555b0e8df4ae3764bcc4be" +"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fast_chemail 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "115e1df89e36c3300a0f88b8b81c41ad24f7bf2b291912e405824d98a553704b" +"checksum fern 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b48af88aaf938b11baef948a5599e66e709cf92854aa2b87c71f1bcf20f80a01" "checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" @@ -2664,6 +2697,7 @@ dependencies = [ "checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum syslog 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a0641142b4081d3d44beffa4eefd7346a228cdf91ed70186db2ca2cef762d327" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" diff --git a/Cargo.toml b/Cargo.toml index aa85e6d8..c4e4452b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,9 @@ name = "bitwarden_rs" version = "1.0.0" authors = ["Daniel García "] +[features] +enable_syslog = ["syslog", "fern/syslog-4"] + [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. rocket = { version = "0.4.0", features = ["tls"], default-features = false } @@ -28,6 +31,11 @@ serde = "1.0.80" serde_derive = "1.0.80" serde_json = "1.0.33" +# Logging +log = "0.4.6" +fern = "0.5.7" +syslog = { version = "4.0.1", optional = true } + # A safe, extensible ORM and Query builder diesel = { version = "1.3.3", features = ["sqlite", "chrono", "r2d2"] } diesel_migrations = { version = "1.3.0", features = ["sqlite"] } diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index d148017f..41e704dc 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -599,15 +599,15 @@ fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers .with_path(path) { SaveResult::Full(SavedData::File(_, size)) => size as i32, SaveResult::Full(other) => { - println!("Attachment is not a file: {:?}", other); + error!("Attachment is not a file: {:?}", other); return; }, SaveResult::Partial(_, reason) => { - println!("Partial result: {:?}", reason); + error!("Partial result: {:?}", reason); return; }, SaveResult::Error(e) => { - println!("Error: {:?}", e); + error!("Error: {:?}", e); return; } }; @@ -616,10 +616,10 @@ fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers attachment.key = attachment_key.clone(); match attachment.save(&conn) { Ok(()) => (), - Err(_) => println!("Error: failed to save attachment") + Err(_) => error!("Failed to save attachment") }; }, - _ => println!("Error: invalid multipart name") + _ => error!("Invalid multipart name") } }).expect("Error processing multipart data"); @@ -751,7 +751,7 @@ fn move_cipher_selected(data: JsonUpcase, headers: Headers, conn: DbConn, } match cipher.save(&conn) { Ok(()) => (), - Err(_) => println!("Error: Failed to save cipher") + Err(_) => err!("Failed to save cipher") }; ws.send_cipher_update(UpdateType::SyncCipherUpdate, &cipher, &cipher.update_users_revision(&conn)); } diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs index 5af2415b..a2361384 100644 --- a/src/api/core/two_factor.rs +++ b/src/api/core/two_factor.rs @@ -243,7 +243,7 @@ fn _generate_recover_code(user: &mut User, conn: &DbConn) { let totp_recover = BASE32.encode(&crypto::get_random(vec![0u8; 20])); user.totp_recover = Some(totp_recover); if user.save(conn).is_err() { - println!("Error: Failed to save the user's two factor recovery code") + error!("Failed to save the user's two factor recovery code") } } } @@ -400,7 +400,7 @@ fn activate_u2f(data: JsonUpcase, headers: Headers, conn: DbConn) }))) } Err(e) => { - println!("Error: {:#?}", e); + error!("{:#?}", e); err!("Error activating u2f") } } @@ -504,11 +504,11 @@ pub fn validate_u2f_login(user_uuid: &str, response: &str, conn: &DbConn) -> Api match response { Ok(new_counter) => { _counter = new_counter; - println!("O {:#}", new_counter); + info!("O {:#}", new_counter); return Ok(()); } Err(e) => { - println!("E {:#}", e); + info!("E {:#}", e); break; } } diff --git a/src/api/icons.rs b/src/api/icons.rs index a29ede6f..585a2c2b 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -43,7 +43,7 @@ fn get_icon (domain: &str) -> Vec { icon }, Err(e) => { - println!("Error downloading icon: {:?}", e); + error!("Error downloading icon: {:?}", e); get_fallback_icon() } } @@ -71,7 +71,7 @@ fn get_icon_url(domain: &str) -> String { } fn download_icon(url: &str) -> Result, reqwest::Error> { - println!("Downloading icon for {}...", url); + info!("Downloading icon for {}...", url); let mut res = reqwest::get(url)?; res = res.error_for_status()?; @@ -105,7 +105,7 @@ fn get_fallback_icon() -> Vec { icon }, Err(e) => { - println!("Error downloading fallback icon: {:?}", e); + error!("Error downloading fallback icon: {:?}", e); vec![] } } diff --git a/src/api/notifications.rs b/src/api/notifications.rs index c44a95ef..df40cf89 100644 --- a/src/api/notifications.rs +++ b/src/api/notifications.rs @@ -169,7 +169,7 @@ impl Handler for WSHandler { } fn on_message(&mut self, msg: Message) -> ws::Result<()> { - println!("Server got message '{}'. ", msg); + info!("Server got message '{}'. ", msg); if let Message::Text(text) = msg.clone() { let json = &text[..text.len() - 1]; // Remove last char diff --git a/src/auth.rs b/src/auth.rs index 0c0623ad..28f706d3 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -51,7 +51,7 @@ pub fn decode_jwt(token: &str) -> Result { match jwt::decode(token, &PUBLIC_RSA_KEY, &validation) { Ok(decoded) => Ok(decoded.claims), Err(msg) => { - println!("Error validating jwt - {:#?}", msg); + error!("Error validating jwt - {:#?}", msg); Err(msg.to_string()) } } diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index 97a4d753..29c3f61b 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -78,11 +78,11 @@ impl Attachment { Ok(_) => break, Err(err) => { if retries < 1 { - println!("ERROR: Failed with 10 retries"); + error!("Failed with 10 retries"); return Err(err) } else { retries -= 1; - println!("Had to retry! Retries left: {}", retries); + info!("Had to retry! Retries left: {}", retries); thread::sleep(time::Duration::from_millis(500)); continue } diff --git a/src/db/models/user.rs b/src/db/models/user.rs index c958a516..283ec3c9 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -180,7 +180,7 @@ impl User { pub fn update_uuid_revision(uuid: &str, conn: &DbConn) { if let Some(mut user) = User::find_by_uuid(&uuid, conn) { if user.update_revision(conn).is_err(){ - println!("Warning: Failed to update revision for {}", user.email); + warn!("Failed to update revision for {}", user.email); }; }; } diff --git a/src/main.rs b/src/main.rs index 560d77c3..3731f61e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,11 @@ extern crate serde_derive; #[macro_use] extern crate serde_json; #[macro_use] +extern crate log; +extern crate fern; +#[cfg(feature = "enable_syslog")] +extern crate syslog; +#[macro_use] extern crate diesel; #[macro_use] extern crate diesel_migrations; @@ -78,6 +83,10 @@ mod migrations { } fn main() { + if CONFIG.extended_logging { + init_logging().ok(); + } + check_db(); check_rsa_keys(); check_web_vault(); @@ -86,13 +95,60 @@ fn main() { init_rocket().launch(); } +fn init_logging() -> Result<(), fern::InitError> { + let mut logger = fern::Dispatch::new() + .format(|out, message, record| { + out.finish(format_args!( + "{}[{}][{}] {}", + chrono::Local::now().format("[%Y-%m-%d][%H:%M:%S]"), + record.target(), + record.level(), + message + )) + }) + .level(log::LevelFilter::Debug) + .level_for("hyper", log::LevelFilter::Warn) + .level_for("ws", log::LevelFilter::Info) + .chain(std::io::stdout()); + + if let Some(log_file) = CONFIG.log_file.as_ref() { + logger = logger.chain(fern::log_file(log_file)?); + } + + logger = chain_syslog(logger); + logger.apply()?; + + Ok(()) +} + +#[cfg(not(feature = "enable_syslog"))] +fn chain_syslog(logger: fern::Dispatch) -> fern::Dispatch { logger } + +#[cfg(feature = "enable_syslog")] +fn chain_syslog(logger: fern::Dispatch) -> fern::Dispatch { + let syslog_fmt = syslog::Formatter3164 { + facility: syslog::Facility::LOG_USER, + hostname: None, + process: "bitwarden_rs".into(), + pid: 0, + }; + + match syslog::unix(syslog_fmt) { + Ok(sl) => logger.chain(sl), + Err(e) => { + error!("Unable to connect to syslog: {:?}", e); + logger + } + } +} + fn check_db() { let path = Path::new(&CONFIG.database_url); if let Some(parent) = path.parent() { use std::fs; if fs::create_dir_all(parent).is_err() { - println!("Error creating database directory"); + error!("Error creating database directory"); exit(1); } } @@ -107,16 +163,16 @@ fn check_rsa_keys() { // If the RSA keys don't exist, try to create them if !util::file_exists(&CONFIG.private_rsa_key) || !util::file_exists(&CONFIG.public_rsa_key) { - println!("JWT keys don't exist, checking if OpenSSL is available..."); + info!("JWT keys don't exist, checking if OpenSSL is available..."); Command::new("openssl") .arg("version") .output().unwrap_or_else(|_| { - println!("Can't create keys because OpenSSL is not available, make sure it's installed and available on the PATH"); + info!("Can't create keys because OpenSSL is not available, make sure it's installed and available on the PATH"); exit(1); }); - println!("OpenSSL detected, creating keys..."); + info!("OpenSSL detected, creating keys..."); let mut success = Command::new("openssl").arg("genrsa") .arg("-out").arg(&CONFIG.private_rsa_key_pem) @@ -140,9 +196,9 @@ fn check_rsa_keys() { .status.success(); if success { - println!("Keys created correctly."); + info!("Keys created correctly."); } else { - println!("Error creating keys, exiting..."); + error!("Error creating keys, exiting..."); exit(1); } } @@ -156,7 +212,7 @@ fn check_web_vault() { let index_path = Path::new(&CONFIG.web_vault_folder).join("index.html"); if !index_path.exists() { - println!("Web vault is not found. Please follow the steps in the README to install it"); + error!("Web vault is not found. Please follow the steps in the README to install it"); exit(1); } } @@ -187,7 +243,7 @@ impl MailConfig { }; let smtp_from = get_env("SMTP_FROM").unwrap_or_else(|| { - println!("Please specify SMTP_FROM to enable SMTP support."); + error!("Please specify SMTP_FROM to enable SMTP support."); exit(1); }); @@ -203,7 +259,7 @@ impl MailConfig { let smtp_username = get_env("SMTP_USERNAME"); let smtp_password = get_env("SMTP_PASSWORD").or_else(|| { if smtp_username.as_ref().is_some() { - println!("SMTP_PASSWORD is mandatory when specifying SMTP_USERNAME."); + error!("SMTP_PASSWORD is mandatory when specifying SMTP_USERNAME."); exit(1); } else { None @@ -237,6 +293,9 @@ pub struct Config { websocket_enabled: bool, websocket_url: String, + extended_logging: bool, + log_file: Option, + local_icon_extractor: bool, signups_allowed: bool, invitations_allowed: bool, @@ -282,6 +341,9 @@ impl Config { websocket_enabled: get_env_or("WEBSOCKET_ENABLED", false), websocket_url: format!("{}:{}", get_env_or("WEBSOCKET_ADDRESS", "0.0.0.0".to_string()), get_env_or("WEBSOCKET_PORT", 3012)), + + extended_logging: get_env_or("EXTENDED_LOGGING", true), + log_file: get_env("LOG_FILE"), local_icon_extractor: get_env_or("LOCAL_ICON_EXTRACTOR", false), signups_allowed: get_env_or("SIGNUPS_ALLOWED", true), diff --git a/src/util.rs b/src/util.rs index 69f64041..05c38b24 100644 --- a/src/util.rs +++ b/src/util.rs @@ -4,7 +4,7 @@ #[macro_export] macro_rules! err { ($err:expr, $msg:expr) => {{ - println!("ERROR: {}", $msg); + error!("{}", $msg); err_json!(json!({ "error": $err, "error_description": $err, @@ -30,7 +30,7 @@ macro_rules! err_json { #[macro_export] macro_rules! err_handler { ($expr:expr) => {{ - println!("ERROR: {}", $expr); + error!("{}", $expr); return $crate::rocket::Outcome::Failure(($crate::rocket::http::Status::Unauthorized, $expr)); }} } From 94810c106a96adab678434a93c9defe125fc8809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 7 Dec 2018 02:05:45 +0100 Subject: [PATCH 17/24] Migrate to rust 2018 edition --- Cargo.toml | 1 + src/api/core/accounts.rs | 12 ++++---- src/api/core/ciphers.rs | 12 ++++---- src/api/core/folders.rs | 8 ++--- src/api/core/mod.rs | 10 +++--- src/api/core/organizations.rs | 10 +++--- src/api/core/two_factor.rs | 12 ++++---- src/api/icons.rs | 2 +- src/api/identity.rs | 16 +++++----- src/api/mod.rs | 2 +- src/api/notifications.rs | 14 ++++----- src/api/web.rs | 4 +-- src/auth.rs | 20 ++++++------ src/db/mod.rs | 2 +- src/db/models/attachment.rs | 10 +++--- src/db/models/cipher.rs | 6 ++-- src/db/models/collection.rs | 4 +-- src/db/models/device.rs | 10 +++--- src/db/models/folder.rs | 6 ++-- src/db/models/organization.rs | 4 +-- src/db/models/two_factor.rs | 4 +-- src/db/models/user.rs | 8 ++--- src/mail.rs | 2 +- src/main.rs | 58 ++++++++--------------------------- src/util.rs | 4 +-- 25 files changed, 105 insertions(+), 136 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c4e4452b..376d5677 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "bitwarden_rs" version = "1.0.0" authors = ["Daniel García "] +edition = "2018" [features] enable_syslog = ["syslog", "fern/syslog-4"] diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index ce8572b7..fbe00796 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -1,13 +1,13 @@ use rocket_contrib::json::Json; -use db::models::*; -use db::DbConn; +use crate::db::models::*; +use crate::db::DbConn; -use api::{EmptyResult, JsonResult, JsonUpcase, NumberOrString, PasswordData, UpdateType, WebSocketUsers}; -use auth::Headers; -use mail; +use crate::api::{EmptyResult, JsonResult, JsonUpcase, NumberOrString, PasswordData, UpdateType, WebSocketUsers}; +use crate::auth::Headers; +use crate::mail; -use CONFIG; +use crate::CONFIG; use rocket::{Route, State}; diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 41e704dc..e5a7c59e 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -12,15 +12,15 @@ use multipart::server::{Multipart, SaveResult}; use data_encoding::HEXLOWER; -use db::models::*; -use db::DbConn; +use crate::db::models::*; +use crate::db::DbConn; -use crypto; +use crate::crypto; -use api::{self, EmptyResult, JsonResult, JsonUpcase, PasswordData, UpdateType, WebSocketUsers}; -use auth::Headers; +use crate::api::{self, EmptyResult, JsonResult, JsonUpcase, PasswordData, UpdateType, WebSocketUsers}; +use crate::auth::Headers; -use CONFIG; +use crate::CONFIG; pub fn routes() -> Vec { routes![ diff --git a/src/api/core/folders.rs b/src/api/core/folders.rs index e60c281f..4c1cdff6 100644 --- a/src/api/core/folders.rs +++ b/src/api/core/folders.rs @@ -2,11 +2,11 @@ use rocket::State; use rocket_contrib::json::Json; use serde_json::Value; -use db::DbConn; -use db::models::*; +use crate::db::DbConn; +use crate::db::models::*; -use api::{JsonResult, EmptyResult, JsonUpcase, WebSocketUsers, UpdateType}; -use auth::Headers; +use crate::api::{JsonResult, EmptyResult, JsonUpcase, WebSocketUsers, UpdateType}; +use crate::auth::Headers; use rocket::Route; diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index d4b4d2e7..46ee76e2 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -34,11 +34,11 @@ use rocket::Route; use rocket_contrib::json::Json; use serde_json::Value; -use db::DbConn; -use db::models::*; +use crate::db::DbConn; +use crate::db::models::*; -use api::{JsonResult, EmptyResult, JsonUpcase}; -use auth::Headers; +use crate::api::{JsonResult, EmptyResult, JsonUpcase}; +use crate::auth::Headers; #[put("/devices/identifier//clear-token")] fn clear_device_token(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { @@ -72,7 +72,7 @@ fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers, con // This should save the push token, but we don't have push functionality - use util::format_date; + use crate::util::format_date; Ok(Json(json!({ "Id": device.uuid, diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index f38876dd..0350b2e1 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -3,12 +3,12 @@ use rocket::request::Form; use rocket_contrib::json::Json; use serde_json::Value; -use CONFIG; -use db::DbConn; -use db::models::*; +use crate::CONFIG; +use crate::db::DbConn; +use crate::db::models::*; -use api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase, WebSocketUsers, UpdateType}; -use auth::{Headers, AdminHeaders, OwnerHeaders}; +use crate::api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase, WebSocketUsers, UpdateType}; +use crate::auth::{Headers, AdminHeaders, OwnerHeaders}; use serde::{Deserialize, Deserializer}; diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs index a2361384..d25a6b42 100644 --- a/src/api/core/two_factor.rs +++ b/src/api/core/two_factor.rs @@ -4,15 +4,15 @@ use serde_json; use serde_json::Value; -use db::{ +use crate::db::{ models::{TwoFactor, TwoFactorType, User}, DbConn, }; -use crypto; +use crate::crypto; -use api::{ApiResult, JsonResult, JsonUpcase, NumberOrString, PasswordData}; -use auth::Headers; +use crate::api::{ApiResult, JsonResult, JsonUpcase, NumberOrString, PasswordData}; +use crate::auth::Headers; use rocket::Route; @@ -74,7 +74,7 @@ struct RecoverTwoFactor { fn recover(data: JsonUpcase, conn: DbConn) -> JsonResult { let data: RecoverTwoFactor = data.into_inner().data; - use db::models::User; + use crate::db::models::User; // Get the user let mut user = match User::find_by_mail(&data.Email, &conn) { @@ -252,7 +252,7 @@ use u2f::messages::{RegisterResponse, SignResponse, U2fSignRequest}; use u2f::protocol::{Challenge, U2f}; use u2f::register::Registration; -use CONFIG; +use crate::CONFIG; const U2F_VERSION: &str = "U2F_V2"; diff --git a/src/api/icons.rs b/src/api/icons.rs index 585a2c2b..a3ff1d39 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -7,7 +7,7 @@ use rocket::http::ContentType; use reqwest; -use CONFIG; +use crate::CONFIG; pub fn routes() -> Vec { routes![icon] diff --git a/src/api/identity.rs b/src/api/identity.rs index 940fcbf9..8236b1d7 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -8,14 +8,14 @@ use serde_json::Value; use num_traits::FromPrimitive; -use db::models::*; -use db::DbConn; +use crate::db::models::*; +use crate::db::DbConn; -use util::{self, JsonMap}; +use crate::util::{self, JsonMap}; -use api::{ApiResult, EmptyResult, JsonResult}; +use crate::api::{ApiResult, EmptyResult, JsonResult}; -use CONFIG; +use crate::CONFIG; pub fn routes() -> Vec { routes![login] @@ -194,13 +194,13 @@ fn twofactor_auth( } Some(TwoFactorType::U2f) => { - use api::core::two_factor; + use crate::api::core::two_factor; two_factor::validate_u2f_login(user_uuid, &twofactor_code, conn)?; } Some(TwoFactorType::YubiKey) => { - use api::core::two_factor; + use crate::api::core::two_factor; two_factor::validate_yubikey_login(user_uuid, twofactor_code, conn)?; } @@ -217,7 +217,7 @@ fn twofactor_auth( } fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &DbConn) -> ApiResult { - use api::core::two_factor; + use crate::api::core::two_factor; let mut result = json!({ "error" : "invalid_grant", diff --git a/src/api/mod.rs b/src/api/mod.rs index 332b3cf0..9c8e49eb 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -20,7 +20,7 @@ type ApiResult = Result>>; type JsonResult = ApiResult>; type EmptyResult = ApiResult<()>; -use util; +use crate::util; type JsonUpcase = Json>; // Common structs representing JSON data received diff --git a/src/api/notifications.rs b/src/api/notifications.rs index df40cf89..6e4f216a 100644 --- a/src/api/notifications.rs +++ b/src/api/notifications.rs @@ -2,11 +2,11 @@ use rocket::Route; use rocket_contrib::json::Json; use serde_json::Value as JsonValue; -use api::JsonResult; -use auth::Headers; -use db::DbConn; +use crate::api::JsonResult; +use crate::auth::Headers; +use crate::db::DbConn; -use CONFIG; +use crate::CONFIG; pub fn routes() -> Vec { routes![negotiate, websockets_err] @@ -19,7 +19,7 @@ fn websockets_err() -> JsonResult { #[post("/hub/negotiate")] fn negotiate(_headers: Headers, _conn: DbConn) -> JsonResult { - use crypto; + use crate::crypto; use data_encoding::BASE64URL; let conn_id = BASE64URL.encode(&crypto::get_random(vec![0u8; 16])); @@ -52,7 +52,7 @@ use chashmap::CHashMap; use chrono::NaiveDateTime; use serde_json::from_str; -use db::models::{Cipher, Folder, User}; +use crate::db::models::{Cipher, Folder, User}; use rmpv::Value; @@ -139,7 +139,7 @@ impl Handler for WSHandler { let _id = &query_split[1][3..]; // Validate the user - use auth; + use crate::auth; let claims = match auth::decode_jwt(access_token) { Ok(claims) => claims, Err(_) => { diff --git a/src/api/web.rs b/src/api/web.rs index 53b7d9a4..8db632a9 100644 --- a/src/api/web.rs +++ b/src/api/web.rs @@ -9,7 +9,7 @@ use rocket::Route; use rocket_contrib::json::Json; use serde_json::Value; -use CONFIG; +use crate::CONFIG; pub fn routes() -> Vec { if CONFIG.web_vault_enabled { @@ -74,7 +74,7 @@ fn attachments(uuid: String, file: PathBuf) -> io::Result { #[get("/alive")] fn alive() -> Json { - use util::format_date; + use crate::util::format_date; use chrono::Utc; Json(format_date(&Utc::now().naive_utc())) diff --git a/src/auth.rs b/src/auth.rs index 28f706d3..6e855381 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -2,21 +2,21 @@ /// JWT Handling /// -use util::read_file; +use crate::util::read_file; use chrono::Duration; -use jwt; +use jsonwebtoken::{self, Algorithm, Header}; use serde::ser::Serialize; -use CONFIG; +use crate::CONFIG; -const JWT_ALGORITHM: jwt::Algorithm = jwt::Algorithm::RS256; +const JWT_ALGORITHM: Algorithm = Algorithm::RS256; lazy_static! { pub static ref DEFAULT_VALIDITY: Duration = Duration::hours(2); pub static ref JWT_ISSUER: String = CONFIG.domain.clone(); - static ref JWT_HEADER: jwt::Header = jwt::Header::new(JWT_ALGORITHM); + static ref JWT_HEADER: Header = Header::new(JWT_ALGORITHM); static ref PRIVATE_RSA_KEY: Vec = match read_file(&CONFIG.private_rsa_key) { Ok(key) => key, @@ -30,14 +30,14 @@ lazy_static! { } pub fn encode_jwt(claims: &T) -> String { - match jwt::encode(&JWT_HEADER, claims, &PRIVATE_RSA_KEY) { + match jsonwebtoken::encode(&JWT_HEADER, claims, &PRIVATE_RSA_KEY) { Ok(token) => token, Err(e) => panic!("Error encoding jwt {}", e) } } pub fn decode_jwt(token: &str) -> Result { - let validation = jwt::Validation { + let validation = jsonwebtoken::Validation { leeway: 30, // 30 seconds validate_exp: true, validate_iat: false, // IssuedAt is the same as NotBefore @@ -48,7 +48,7 @@ pub fn decode_jwt(token: &str) -> Result { algorithms: vec![JWT_ALGORITHM], }; - match jwt::decode(token, &PUBLIC_RSA_KEY, &validation) { + match jsonwebtoken::decode(token, &PUBLIC_RSA_KEY, &validation) { Ok(decoded) => Ok(decoded.claims), Err(msg) => { error!("Error validating jwt - {:#?}", msg); @@ -94,8 +94,8 @@ pub struct JWTClaims { use rocket::Outcome; use rocket::request::{self, Request, FromRequest}; -use db::DbConn; -use db::models::{User, Organization, UserOrganization, UserOrgType, UserOrgStatus, Device}; +use crate::db::DbConn; +use crate::db::models::{User, Organization, UserOrganization, UserOrgType, UserOrgStatus, Device}; pub struct Headers { pub host: String, diff --git a/src/db/mod.rs b/src/db/mod.rs index dff2b0cc..e72dc771 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -9,7 +9,7 @@ use rocket::http::Status; use rocket::request::{self, FromRequest}; use rocket::{Outcome, Request, State}; -use CONFIG; +use crate::CONFIG; /// An alias to the database connection used type Connection = SqliteConnection; diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index 29c3f61b..5cec96c7 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -1,7 +1,7 @@ use serde_json::Value; use super::Cipher; -use CONFIG; +use crate::CONFIG; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] #[table_name = "attachments"] @@ -32,7 +32,7 @@ impl Attachment { } pub fn to_json(&self, host: &str) -> Value { - use util::get_display_size; + use crate::util::get_display_size; let web_path = format!("{}/attachments/{}/{}", host, self.cipher_uuid, self.id); let display_size = get_display_size(self.file_size); @@ -51,8 +51,8 @@ impl Attachment { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::attachments; +use crate::db::DbConn; +use crate::db::schema::attachments; /// Database methods impl Attachment { @@ -64,7 +64,7 @@ impl Attachment { } pub fn delete(self, conn: &DbConn) -> QueryResult<()> { - use util; + use crate::util; use std::{thread, time}; let mut retries = 10; diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 5a5ac059..8caa2e02 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -63,14 +63,14 @@ impl Cipher { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::*; +use crate::db::DbConn; +use crate::db::schema::*; /// Database methods impl Cipher { pub fn to_json(&self, host: &str, user_uuid: &str, conn: &DbConn) -> Value { use serde_json; - use util::format_date; + use crate::util::format_date; use super::Attachment; let attachments = Attachment::find_by_cipher(&self.uuid, conn); diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs index 0535cef4..5b5a40c6 100644 --- a/src/db/models/collection.rs +++ b/src/db/models/collection.rs @@ -37,8 +37,8 @@ impl Collection { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::*; +use crate::db::DbConn; +use crate::db::schema::*; /// Database methods impl Collection { diff --git a/src/db/models/device.rs b/src/db/models/device.rs index ca998378..81c2d0f9 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -45,7 +45,7 @@ impl Device { pub fn refresh_twofactor_remember(&mut self) -> String { use data_encoding::BASE64; - use crypto; + use crate::crypto; let twofactor_remember = BASE64.encode(&crypto::get_random(vec![0u8; 180])); self.twofactor_remember = Some(twofactor_remember.clone()); @@ -62,7 +62,7 @@ impl Device { // If there is no refresh token, we create one if self.refresh_token.is_empty() { use data_encoding::BASE64URL; - use crypto; + use crate::crypto; self.refresh_token = BASE64URL.encode(&crypto::get_random_64()); } @@ -77,7 +77,7 @@ impl Device { // Create the JWT claims struct, to send to the client - use auth::{encode_jwt, JWTClaims, DEFAULT_VALIDITY, JWT_ISSUER}; + use crate::auth::{encode_jwt, JWTClaims, DEFAULT_VALIDITY, JWT_ISSUER}; let claims = JWTClaims { nbf: time_now.timestamp(), exp: (time_now + *DEFAULT_VALIDITY).timestamp(), @@ -106,8 +106,8 @@ impl Device { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::devices; +use crate::db::DbConn; +use crate::db::schema::devices; /// Database methods impl Device { diff --git a/src/db/models/folder.rs b/src/db/models/folder.rs index 5b52a557..9e384086 100644 --- a/src/db/models/folder.rs +++ b/src/db/models/folder.rs @@ -43,7 +43,7 @@ impl Folder { } pub fn to_json(&self) -> Value { - use util::format_date; + use crate::util::format_date; json!({ "Id": self.uuid, @@ -65,8 +65,8 @@ impl FolderCipher { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::{folders, folders_ciphers}; +use crate::db::DbConn; +use crate::db::schema::{folders, folders_ciphers}; /// Database methods impl Folder { diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index d21fd390..bddb3dd7 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -236,8 +236,8 @@ impl UserOrganization { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::{organizations, users_organizations, users_collections, ciphers_collections}; +use crate::db::DbConn; +use crate::db::schema::{organizations, users_organizations, users_collections, ciphers_collections}; /// Database methods impl Organization { diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs index b47a3a81..878dafda 100644 --- a/src/db/models/two_factor.rs +++ b/src/db/models/two_factor.rs @@ -78,8 +78,8 @@ impl TwoFactor { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::twofactor; +use crate::db::DbConn; +use crate::db::schema::twofactor; /// Database methods impl TwoFactor { diff --git a/src/db/models/user.rs b/src/db/models/user.rs index 283ec3c9..d830b601 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -3,8 +3,8 @@ use serde_json::Value; use uuid::Uuid; -use crypto; -use CONFIG; +use crate::crypto; +use crate::CONFIG; #[derive(Debug, Identifiable, Queryable, Insertable)] @@ -113,8 +113,8 @@ impl User { use diesel; use diesel::prelude::*; -use db::DbConn; -use db::schema::{users, invitations}; +use crate::db::DbConn; +use crate::db::schema::{users, invitations}; use super::{Cipher, Folder, Device, UserOrganization, UserOrgType}; /// Database methods diff --git a/src/mail.rs b/src/mail.rs index cb50e364..8a64c24b 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -4,7 +4,7 @@ use lettre::smtp::ConnectionReuseParameters; use lettre::smtp::authentication::Credentials; use lettre_email::EmailBuilder; -use MailConfig; +use crate::MailConfig; fn mailer(config: &MailConfig) -> SmtpTransport { let client_security = if config.smtp_ssl { diff --git a/src/main.rs b/src/main.rs index 3731f61e..0566d6ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,47 +1,15 @@ -#![feature(proc_macro_hygiene, decl_macro, custom_derive, vec_remove_item, try_trait, nll)] -#![recursion_limit="128"] +#![feature(proc_macro_hygiene, decl_macro, vec_remove_item, try_trait)] +#![recursion_limit = "128"] #![allow(proc_macro_derive_resolution_fallback)] // TODO: Remove this when diesel update fixes warnings -#[macro_use] -extern crate rocket; -extern crate rocket_contrib; -extern crate reqwest; -extern crate multipart; -extern crate ws; -extern crate rmpv; -extern crate chashmap; -extern crate serde; -#[macro_use] -extern crate serde_derive; -#[macro_use] -extern crate serde_json; -#[macro_use] -extern crate log; -extern crate fern; -#[cfg(feature = "enable_syslog")] -extern crate syslog; -#[macro_use] -extern crate diesel; -#[macro_use] -extern crate diesel_migrations; -extern crate ring; -extern crate uuid; -extern crate chrono; -extern crate oath; -extern crate data_encoding; -extern crate jsonwebtoken as jwt; -extern crate u2f; -extern crate yubico; -extern crate dotenv; -#[macro_use] -extern crate lazy_static; -#[macro_use] -extern crate num_derive; -extern crate num_traits; -extern crate lettre; -extern crate lettre_email; -extern crate native_tls; -extern crate byteorder; +#[macro_use] extern crate rocket; +#[macro_use] extern crate serde_derive; +#[macro_use] extern crate serde_json; +#[macro_use] extern crate log; +#[macro_use] extern crate diesel; +#[macro_use] extern crate diesel_migrations; +#[macro_use] extern crate lazy_static; +#[macro_use] extern crate num_derive; use std::{path::Path, process::{exit, Command}}; use rocket::Rocket; @@ -75,7 +43,7 @@ mod migrations { pub fn run_migrations() { // Make sure the database is up to date (create if it doesn't exist, or run the migrations) - let connection = ::db::get_connection().expect("Can't conect to DB"); + let connection = crate::db::get_connection().expect("Can't conect to DB"); use std::io::stdout; embedded_migrations::run_with_output(&connection, &mut stdout()).expect("Can't run migrations"); @@ -234,7 +202,7 @@ pub struct MailConfig { impl MailConfig { fn load() -> Option { - use util::{get_env, get_env_or}; + use crate::util::{get_env, get_env_or}; // When SMTP_HOST is absent, we assume the user does not want to enable it. let smtp_host = match get_env("SMTP_HOST") { @@ -316,7 +284,7 @@ pub struct Config { impl Config { fn load() -> Self { - use util::{get_env, get_env_or}; + use crate::util::{get_env, get_env_or}; dotenv::dotenv().ok(); let df = get_env_or("DATA_FOLDER", "data".to_string()); diff --git a/src/util.rs b/src/util.rs index 05c38b24..4bbd145d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -23,7 +23,7 @@ macro_rules! err { #[macro_export] macro_rules! err_json { ($expr:expr) => {{ - return Err($crate::rocket::response::status::BadRequest(Some($crate::rocket_contrib::json::Json($expr)))); + return Err(rocket::response::status::BadRequest(Some(rocket_contrib::json::Json($expr)))); }} } @@ -31,7 +31,7 @@ macro_rules! err_json { macro_rules! err_handler { ($expr:expr) => {{ error!("{}", $expr); - return $crate::rocket::Outcome::Failure(($crate::rocket::http::Status::Unauthorized, $expr)); + return rocket::Outcome::Failure((rocket::http::Status::Unauthorized, $expr)); }} } From cb930a0858172bc64f99578f6050863712fd1225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 7 Dec 2018 14:32:40 +0100 Subject: [PATCH 18/24] Remove some required values during login, now uses default values --- src/api/identity.rs | 11 ++++------- src/db/models/cipher.rs | 4 +--- src/db/models/collection.rs | 4 +--- src/db/models/folder.rs | 4 +--- src/db/models/organization.rs | 5 ++--- src/db/models/two_factor.rs | 4 +--- src/db/models/user.rs | 8 +++----- src/util.rs | 4 ++++ 8 files changed, 17 insertions(+), 27 deletions(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index 8236b1d7..da361bc7 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -92,9 +92,9 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) )) } - let device_type: i32 = util::try_parse_string(data.device_type.as_ref()).expect("Invalid type"); - let device_id = data.device_identifier.clone().expect("Missing device id"); - let device_name = data.device_name.clone().expect("Missing device name"); + let device_type = util::try_parse_string(data.device_type.as_ref()).unwrap_or(0); + let device_id = data.device_identifier.clone().unwrap_or_else(|| crate::util::get_uuid()); + let device_name = data.device_name.clone().unwrap_or("unknown_device".into()); // Find device or create new let mut device = match Device::find_by_uuid(&device_id, &conn) { @@ -325,10 +325,7 @@ fn validate_data(data: &ConnectData) -> EmptyResult { _check_is_some(&data.client_id, "client_id cannot be blank")?; _check_is_some(&data.password, "password cannot be blank")?; _check_is_some(&data.scope, "scope cannot be blank")?; - _check_is_some(&data.username, "username cannot be blank")?; - _check_is_some(&data.device_identifier, "device_identifier cannot be blank")?; - _check_is_some(&data.device_name, "device_name cannot be blank")?; - _check_is_some(&data.device_type, "device_type cannot be blank") + _check_is_some(&data.username, "username cannot be blank") } } } diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 8caa2e02..fc1eacb7 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -1,8 +1,6 @@ use chrono::{NaiveDateTime, Utc}; use serde_json::Value; -use uuid::Uuid; - use super::{User, Organization, Attachment, FolderCipher, CollectionCipher, UserOrganization, UserOrgType, UserOrgStatus}; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] @@ -41,7 +39,7 @@ impl Cipher { let now = Utc::now().naive_utc(); Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), created_at: now, updated_at: now, diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs index 5b5a40c6..962563f7 100644 --- a/src/db/models/collection.rs +++ b/src/db/models/collection.rs @@ -1,7 +1,5 @@ use serde_json::Value; -use uuid::Uuid; - use super::{Organization, UserOrganization, UserOrgType, UserOrgStatus}; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] @@ -18,7 +16,7 @@ pub struct Collection { impl Collection { pub fn new(org_uuid: String, name: String) -> Self { Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), org_uuid, name, diff --git a/src/db/models/folder.rs b/src/db/models/folder.rs index 9e384086..3a932b57 100644 --- a/src/db/models/folder.rs +++ b/src/db/models/folder.rs @@ -1,8 +1,6 @@ use chrono::{NaiveDateTime, Utc}; use serde_json::Value; -use uuid::Uuid; - use super::{User, Cipher}; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] @@ -33,7 +31,7 @@ impl Folder { let now = Utc::now().naive_utc(); Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), created_at: now, updated_at: now, diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index bddb3dd7..94e2a29a 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -1,7 +1,6 @@ use std::cmp::Ordering; use serde_json::Value; -use uuid::Uuid; use super::{User, CollectionUser, Invitation}; #[derive(Debug, Identifiable, Queryable, Insertable)] @@ -159,7 +158,7 @@ impl Organization { pub fn new(name: String, billing_email: String) -> Self { Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), name, billing_email, @@ -206,7 +205,7 @@ impl Organization { impl UserOrganization { pub fn new(user_uuid: String, org_uuid: String) -> Self { Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), user_uuid, org_uuid, diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs index 878dafda..1e2c9a57 100644 --- a/src/db/models/two_factor.rs +++ b/src/db/models/two_factor.rs @@ -1,7 +1,5 @@ use serde_json::Value; -use uuid::Uuid; - use super::User; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] @@ -36,7 +34,7 @@ pub enum TwoFactorType { impl TwoFactor { pub fn new(user_uuid: String, type_: TwoFactorType, data: String) -> Self { Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), user_uuid, type_: type_ as i32, enabled: true, diff --git a/src/db/models/user.rs b/src/db/models/user.rs index d830b601..8f509997 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -1,8 +1,6 @@ use chrono::{NaiveDateTime, Utc}; use serde_json::Value; -use uuid::Uuid; - use crate::crypto; use crate::CONFIG; @@ -50,7 +48,7 @@ impl User { let email = mail.to_lowercase(); Self { - uuid: Uuid::new_v4().to_string(), + uuid: crate::util::get_uuid(), created_at: now, updated_at: now, name: email.clone(), @@ -61,7 +59,7 @@ impl User { salt: crypto::get_random_64(), password_iterations: CONFIG.password_iterations, - security_stamp: Uuid::new_v4().to_string(), + security_stamp: crate::util::get_uuid(), password_hint: None, private_key: None, @@ -100,7 +98,7 @@ impl User { } pub fn reset_security_stamp(&mut self) { - self.security_stamp = Uuid::new_v4().to_string(); + self.security_stamp = crate::util::get_uuid(); } pub fn is_server_admin(&self) -> bool { diff --git a/src/util.rs b/src/util.rs index 4bbd145d..33ab85ca 100644 --- a/src/util.rs +++ b/src/util.rs @@ -92,6 +92,10 @@ pub fn get_display_size(size: i32) -> String { format!("{} {}", size, UNITS[unit_counter]) } +pub fn get_uuid() -> String { + uuid::Uuid::new_v4().to_string() +} + /// /// String util methods From 738ad2127bcd71f07c075a6df6424fb11fcd5837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 7 Dec 2018 15:01:29 +0100 Subject: [PATCH 19/24] Fixed some clippy linting issues --- src/api/core/ciphers.rs | 2 +- src/api/core/two_factor.rs | 7 +++---- src/api/identity.rs | 2 +- src/api/notifications.rs | 12 ++++++------ src/auth.rs | 8 ++++---- src/db/models/cipher.rs | 14 ++++---------- src/db/models/collection.rs | 7 ++----- src/db/models/organization.rs | 10 +++++----- 8 files changed, 26 insertions(+), 36 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index e5a7c59e..f1d3f38a 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -180,7 +180,7 @@ pub struct Attachments2Data { fn post_ciphers_admin(data: JsonUpcase, headers: Headers, conn: DbConn, ws: State) -> JsonResult { let data: ShareCipherData = data.into_inner().data; - let mut cipher = Cipher::new(data.Cipher.Type.clone(), data.Cipher.Name.clone()); + let mut cipher = Cipher::new(data.Cipher.Type, data.Cipher.Name.clone()); cipher.user_uuid = Some(headers.user.uuid.clone()); match cipher.save(&conn) { Ok(()) => (), diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs index d25a6b42..ef017af7 100644 --- a/src/api/core/two_factor.rs +++ b/src/api/core/two_factor.rs @@ -568,9 +568,8 @@ fn parse_yubikeys(data: &EnableYubikeyData) -> Vec { fn jsonify_yubikeys(yubikeys: Vec) -> serde_json::Value { let mut result = json!({}); - for i in 0..yubikeys.len() { - let ref key = &yubikeys[i]; - result[format!("Key{}", i+1)] = Value::String(key.to_string()); + for (i, key) in yubikeys.into_iter().enumerate() { + result[format!("Key{}", i+1)] = Value::String(key); } result @@ -654,7 +653,7 @@ fn activate_yubikey(data: JsonUpcase, headers: Headers, conn: let yubikeys = parse_yubikeys(&data); - if yubikeys.len() == 0 { + if yubikeys.is_empty() { return Ok(Json(json!({ "Enabled": false, "Object": "twoFactorU2f", diff --git a/src/api/identity.rs b/src/api/identity.rs index da361bc7..58628d73 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -93,7 +93,7 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) } let device_type = util::try_parse_string(data.device_type.as_ref()).unwrap_or(0); - let device_id = data.device_identifier.clone().unwrap_or_else(|| crate::util::get_uuid()); + let device_id = data.device_identifier.clone().unwrap_or_else(crate::util::get_uuid); let device_name = data.device_name.clone().unwrap_or("unknown_device".into()); // Find device or create new diff --git a/src/api/notifications.rs b/src/api/notifications.rs index 6e4f216a..d126b2ad 100644 --- a/src/api/notifications.rs +++ b/src/api/notifications.rs @@ -242,10 +242,10 @@ pub struct WebSocketUsers { } impl WebSocketUsers { - fn send_update(&self, user_uuid: &String, data: Vec) -> ws::Result<()> { + fn send_update(&self, user_uuid: &String, data: &[u8]) -> ws::Result<()> { if let Some(user) = self.map.get(user_uuid) { for sender in user.iter() { - sender.send(data.clone())?; + sender.send(data)?; } } Ok(()) @@ -262,7 +262,7 @@ impl WebSocketUsers { ut, ); - self.send_update(&user.uuid.clone(), data).ok(); + self.send_update(&user.uuid.clone(), &data).ok(); } pub fn send_folder_update(&self, ut: UpdateType, folder: &Folder) { @@ -275,10 +275,10 @@ impl WebSocketUsers { ut, ); - self.send_update(&folder.user_uuid, data).ok(); + self.send_update(&folder.user_uuid, &data).ok(); } - pub fn send_cipher_update(&self, ut: UpdateType, cipher: &Cipher, user_uuids: &Vec) { + pub fn send_cipher_update(&self, ut: UpdateType, cipher: &Cipher, user_uuids: &[String]) { let user_uuid = convert_option(cipher.user_uuid.clone()); let org_uuid = convert_option(cipher.organization_uuid.clone()); @@ -294,7 +294,7 @@ impl WebSocketUsers { ); for uuid in user_uuids { - self.send_update(&uuid, data.clone()).ok(); + self.send_update(&uuid, &data).ok(); } } } diff --git a/src/auth.rs b/src/auth.rs index 6e855381..5085341c 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -192,7 +192,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { fn from_request(request: &'a Request<'r>) -> request::Outcome { match request.guard::() { - Outcome::Forward(f) => Outcome::Forward(f), + Outcome::Forward(_) => Outcome::Forward(()), Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { // org_id is expected to be the second param ("/organizations/") @@ -225,7 +225,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for OrgHeaders { device: headers.device, user: headers.user, org_user_type: { - if let Some(org_usr_type) = UserOrgType::from_i32(&org_user.type_) { + if let Some(org_usr_type) = UserOrgType::from_i32(org_user.type_) { org_usr_type } else { // This should only happen if the DB is corrupted err_handler!("Unknown user type in the database") @@ -252,7 +252,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for AdminHeaders { fn from_request(request: &'a Request<'r>) -> request::Outcome { match request.guard::() { - Outcome::Forward(f) => Outcome::Forward(f), + Outcome::Forward(_) => Outcome::Forward(()), Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { if headers.org_user_type >= UserOrgType::Admin { @@ -281,7 +281,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for OwnerHeaders { fn from_request(request: &'a Request<'r>) -> request::Outcome { match request.guard::() { - Outcome::Forward(f) => Outcome::Forward(f), + Outcome::Forward(_) => Outcome::Forward(()), Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { if headers.org_user_type == UserOrgType::Owner { diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index fc1eacb7..3b7f2dbb 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -232,7 +232,7 @@ impl Cipher { } pub fn is_write_accessible_to_user(&self, user_uuid: &str, conn: &DbConn) -> bool { - match ciphers::table + ciphers::table .filter(ciphers::uuid.eq(&self.uuid)) .left_join(users_organizations::table.on( ciphers::organization_uuid.eq(users_organizations::org_uuid.nullable()).and( @@ -253,14 +253,11 @@ impl Cipher { ) )) .select(ciphers::all_columns) - .first::(&**conn).ok() { - Some(_) => true, - None => false - } + .first::(&**conn).ok().is_some() } pub fn is_accessible_to_user(&self, user_uuid: &str, conn: &DbConn) -> bool { - match ciphers::table + ciphers::table .filter(ciphers::uuid.eq(&self.uuid)) .left_join(users_organizations::table.on( ciphers::organization_uuid.eq(users_organizations::org_uuid.nullable()).and( @@ -279,10 +276,7 @@ impl Cipher { ) )) .select(ciphers::all_columns) - .first::(&**conn).ok() { - Some(_) => true, - None => false - } + .first::(&**conn).ok().is_some() } pub fn get_folder_uuid(&self, user_uuid: &str, conn: &DbConn) -> Option { diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs index 962563f7..6c3f640e 100644 --- a/src/db/models/collection.rs +++ b/src/db/models/collection.rs @@ -148,15 +148,12 @@ impl Collection { if user_org.access_all { true } else { - match users_collections::table.inner_join(collections::table) + users_collections::table.inner_join(collections::table) .filter(users_collections::collection_uuid.eq(&self.uuid)) .filter(users_collections::user_uuid.eq(&user_uuid)) .filter(users_collections::read_only.eq(false)) .select(collections::all_columns) - .first::(&**conn).ok() { - None => false, // Read only or no access to collection - Some(_) => true, - } + .first::(&**conn).ok().is_some() // Read only or no access to collection } } } diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 94e2a29a..a83a9725 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -77,10 +77,10 @@ impl PartialEq for UserOrgType { impl PartialOrd for UserOrgType { fn partial_cmp(&self, other: &i32) -> Option { - if let Some(other) = Self::from_i32(other) { + if let Some(other) = Self::from_i32(*other) { return Some(self.cmp(&other)) } - return None + None } fn gt(&self, other: &i32) -> bool { @@ -107,10 +107,10 @@ impl PartialEq for i32 { impl PartialOrd for i32 { fn partial_cmp(&self, other: &UserOrgType) -> Option { - if let Some(self_type) = UserOrgType::from_i32(self) { + if let Some(self_type) = UserOrgType::from_i32(*self) { return Some(self_type.cmp(other)) } - return None + None } fn lt(&self, other: &UserOrgType) -> bool { @@ -140,7 +140,7 @@ impl UserOrgType { } } - pub fn from_i32(i: &i32) -> Option { + pub fn from_i32(i: i32) -> Option { match i { 0 => Some(UserOrgType::Owner), 1 => Some(UserOrgType::Admin), From 19754c967fec78d1e303359c634b41bcf6dce076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 7 Dec 2018 18:25:18 +0100 Subject: [PATCH 20/24] More changes to the push token, and filtered multipart logs --- src/api/core/mod.rs | 48 +++++++++++++++------------------------------ src/main.rs | 4 ++++ 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index 46ee76e2..a6e32c90 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -28,28 +28,22 @@ pub fn routes() -> Vec { /// /// Move this somewhere else /// - use rocket::Route; use rocket_contrib::json::Json; use serde_json::Value; use crate::db::DbConn; -use crate::db::models::*; -use crate::api::{JsonResult, EmptyResult, JsonUpcase}; +use crate::api::{EmptyResult, JsonResult, JsonUpcase}; use crate::auth::Headers; #[put("/devices/identifier//clear-token")] -fn clear_device_token(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { - let device = match Device::find_by_uuid(&uuid, &conn) { - Some(device) => device, - None => err!("Device not found") - }; +fn clear_device_token(uuid: String) -> EmptyResult { + // This endpoint doesn't have auth header - if device.user_uuid != headers.user.uuid { - err!("Device not owned by user") - } + let _ = uuid; + // uuid is not related to deviceId // This only clears push token // https://github.com/bitwarden/core/blob/master/src/Api/Controllers/DevicesController.cs#L109 @@ -58,28 +52,20 @@ fn clear_device_token(uuid: String, headers: Headers, conn: DbConn) -> EmptyResu } #[put("/devices/identifier//token", data = "")] -fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers, conn: DbConn) -> JsonResult { +fn put_device_token(uuid: String, data: JsonUpcase, headers: Headers) -> JsonResult { let _data: Value = data.into_inner().data; + // Data has a single string value "PushToken" + let _ = uuid; + // uuid is not related to deviceId - let device = match Device::find_by_uuid(&uuid, &conn) { - Some(device) => device, - None => err!("Device not found") - }; - - if device.user_uuid != headers.user.uuid { - err!("Device not owned by user") - } - - // This should save the push token, but we don't have push functionality - - use crate::util::format_date; + // TODO: This should save the push token, but we don't have push functionality Ok(Json(json!({ - "Id": device.uuid, - "Name": device.name, - "Type": device.type_, - "Identifier": device.uuid, - "CreationDate": format_date(&device.created_at), + "Id": headers.device.uuid, + "Name": headers.device.name, + "Type": headers.device.type_, + "Identifier": headers.device.uuid, + "CreationDate": crate::util::format_date(&headers.device.created_at), }))) } @@ -114,7 +100,6 @@ fn get_eq_domains(headers: Headers) -> JsonResult { }))) } - #[derive(Deserialize, Debug)] #[allow(non_snake_case)] struct EquivDomainData { @@ -137,9 +122,8 @@ fn post_eq_domains(data: JsonUpcase, headers: Headers, conn: Db match user.save(&conn) { Ok(()) => Ok(Json(json!({}))), - Err(_) => err!("Failed to save user") + Err(_) => err!("Failed to save user"), } - } #[put("/settings/domains", data = "")] diff --git a/src/main.rs b/src/main.rs index 0566d6ba..963f82fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,6 +24,9 @@ mod auth; mod mail; fn init_rocket() -> Rocket { + + // TODO: TO HIDE MOUNTING LOG, call ignite, set logging to disabled, call all the mounts, and then enable it again + rocket::ignite() .mount("/", api::web_routes()) .mount("/api", api::core_routes()) @@ -77,6 +80,7 @@ fn init_logging() -> Result<(), fern::InitError> { .level(log::LevelFilter::Debug) .level_for("hyper", log::LevelFilter::Warn) .level_for("ws", log::LevelFilter::Info) + .level_for("multipart", log::LevelFilter::Info) .chain(std::io::stdout()); if let Some(log_file) = CONFIG.log_file.as_ref() { From 7adc045b806960f0f8f3eb2968672eabed586620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sun, 9 Dec 2018 17:58:38 +0100 Subject: [PATCH 21/24] Updated IP logging to use client_ip, to match old remote behavior. Improved error logging, now it won't show a generic error message in some situations. Removed delete device, which is not needed as it will be overwritten later. Logged more info when an error occurs saving a device. Added orgmanager to JWT claims. --- src/api/identity.rs | 39 ++++++++++++++----------------------- src/auth.rs | 43 +++++++++++++++++++++++++++++------------ src/db/models/device.rs | 2 ++ src/util.rs | 38 ++++++++++++++++++++++-------------- 4 files changed, 71 insertions(+), 51 deletions(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index 58628d73..01e37061 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -1,5 +1,3 @@ -use std::net::{IpAddr, Ipv4Addr, SocketAddr}; - use rocket::request::LenientForm; use rocket::Route; @@ -15,6 +13,8 @@ use crate::util::{self, JsonMap}; use crate::api::{ApiResult, EmptyResult, JsonResult}; +use crate::auth::ClientIp; + use crate::CONFIG; pub fn routes() -> Vec { @@ -22,13 +22,13 @@ pub fn routes() -> Vec { } #[post("/connect/token", data = "")] -fn login(data: LenientForm, conn: DbConn, socket: Option) -> JsonResult { +fn login(data: LenientForm, conn: DbConn, ip: ClientIp) -> JsonResult { let data: ConnectData = data.into_inner(); validate_data(&data)?; match data.grant_type { GrantType::refresh_token => _refresh_login(data, conn), - GrantType::password => _password_login(data, conn, socket), + GrantType::password => _password_login(data, conn, ip), } } @@ -56,17 +56,11 @@ fn _refresh_login(data: ConnectData, conn: DbConn) -> JsonResult { "Key": user.key, "PrivateKey": user.private_key, }))), - Err(_) => err!("Failed to add device to user"), + Err(e) => err!("Failed to add device to user", e), } } -fn _password_login(data: ConnectData, conn: DbConn, remote: Option) -> JsonResult { - // Get the ip for error reporting - let ip = match remote { - Some(ip) => ip.ip(), - None => IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), - }; - +fn _password_login(data: ConnectData, conn: DbConn, ip: ClientIp) -> JsonResult { // Validate scope let scope = data.scope.as_ref().unwrap(); if scope != "api offline_access" { @@ -79,7 +73,7 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) Some(user) => user, None => err!(format!( "Username or password is incorrect. Try again. IP: {}. Username: {}.", - ip, username + ip.ip, username )), }; @@ -88,7 +82,7 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) if !user.check_valid_password(password) { err!(format!( "Username or password is incorrect. Try again. IP: {}. Username: {}.", - ip, username + ip.ip, username )) } @@ -99,20 +93,15 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) // Find device or create new let mut device = match Device::find_by_uuid(&device_id, &conn) { Some(device) => { - // Check if valid device + // Check if owned device, and recreate if not if device.user_uuid != user.uuid { - match device.delete(&conn) { - Ok(()) => Device::new(device_id, user.uuid.clone(), device_name, device_type), - Err(_) => err!("Tried to delete device not owned by user, but failed"), - } + info!("Device exists but is owned by another user. The old device will be discarded"); + Device::new(device_id, user.uuid.clone(), device_name, device_type) } else { device } } - None => { - // Create new device - Device::new(device_id, user.uuid.clone(), device_name, device_type) - } + None => Device::new(device_id, user.uuid.clone(), device_name, device_type) }; let twofactor_token = twofactor_auth(&user.uuid, &data.clone(), &mut device, &conn)?; @@ -122,8 +111,8 @@ fn _password_login(data: ConnectData, conn: DbConn, remote: Option) let orgs = UserOrganization::find_by_user(&user.uuid, &conn); let (access_token, expires_in) = device.refresh_tokens(&user, orgs); - if device.save(&conn).is_err() { - err!("Failed to add device to user") + if let Err(e) = device.save(&conn) { + err!("Failed to add device to user", e) } let mut result = json!({ diff --git a/src/auth.rs b/src/auth.rs index 5085341c..6f351431 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -1,7 +1,6 @@ /// /// JWT Handling /// - use crate::util::read_file; use chrono::Duration; @@ -76,6 +75,7 @@ pub struct JWTClaims { pub orgowner: Vec, pub orgadmin: Vec, pub orguser: Vec, + pub orgmanager: Vec, // user security_stamp pub sstamp: String, @@ -90,7 +90,6 @@ pub struct JWTClaims { /// /// Bearer token authentication /// - use rocket::Outcome; use rocket::request::{self, Request, FromRequest}; @@ -139,13 +138,11 @@ impl<'a, 'r> FromRequest<'a, 'r> for Headers { // Get access_token let access_token: &str = match request.headers().get_one("Authorization") { - Some(a) => { - match a.rsplit("Bearer ").next() { - Some(split) => split, - None => err_handler!("No access token provided") - } - } - None => err_handler!("No access token provided") + Some(a) => match a.rsplit("Bearer ").next() { + Some(split) => split, + None => err_handler!("No access token provided"), + }, + None => err_handler!("No access token provided"), }; // Check JWT token is valid and get device and user from it @@ -256,7 +253,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for AdminHeaders { Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { if headers.org_user_type >= UserOrgType::Admin { - Outcome::Success(Self{ + Outcome::Success(Self { host: headers.host, device: headers.device, user: headers.user, @@ -285,7 +282,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for OwnerHeaders { Outcome::Failure(f) => Outcome::Failure(f), Outcome::Success(headers) => { if headers.org_user_type == UserOrgType::Owner { - Outcome::Success(Self{ + Outcome::Success(Self { host: headers.host, device: headers.device, user: headers.user, @@ -296,4 +293,26 @@ impl<'a, 'r> FromRequest<'a, 'r> for OwnerHeaders { } } } -} \ No newline at end of file +} + +/// +/// Client IP address detection +/// +use std::net::IpAddr; + +pub struct ClientIp { + pub ip: IpAddr, +} + +impl<'a, 'r> FromRequest<'a, 'r> for ClientIp { + type Error = (); + + fn from_request(request: &'a Request<'r>) -> request::Outcome { + let ip = match request.client_ip() { + Some(addr) => addr, + None => "0.0.0.0".parse().unwrap(), + }; + + Outcome::Success(ClientIp { ip }) + } +} diff --git a/src/db/models/device.rs b/src/db/models/device.rs index 81c2d0f9..b415d5e7 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -74,6 +74,7 @@ impl Device { let orgowner: Vec<_> = orgs.iter().filter(|o| o.type_ == 0).map(|o| o.org_uuid.clone()).collect(); let orgadmin: Vec<_> = orgs.iter().filter(|o| o.type_ == 1).map(|o| o.org_uuid.clone()).collect(); let orguser: Vec<_> = orgs.iter().filter(|o| o.type_ == 2).map(|o| o.org_uuid.clone()).collect(); + let orgmanager: Vec<_> = orgs.iter().filter(|o| o.type_ == 3).map(|o| o.org_uuid.clone()).collect(); // Create the JWT claims struct, to send to the client @@ -92,6 +93,7 @@ impl Device { orgowner, orgadmin, orguser, + orgmanager, sstamp: user.security_stamp.to_string(), device: self.uuid.to_string(), diff --git a/src/util.rs b/src/util.rs index 33ab85ca..e43dbcac 100644 --- a/src/util.rs +++ b/src/util.rs @@ -2,22 +2,32 @@ /// Macros /// #[macro_export] -macro_rules! err { - ($err:expr, $msg:expr) => {{ - error!("{}", $msg); +macro_rules! _err_object { + ($msg:expr) => {{ err_json!(json!({ - "error": $err, - "error_description": $err, - "ErrorModel": { - "Message": $msg, - "ValidationErrors": null, - "ExceptionMessage": null, - "ExceptionStackTrace": null, - "InnerExceptionMessage": null, - "Object": "error" - }})) + "Message": "", + "error": "", + "error_description": "", + "ValidationErrors": {"": [ $msg ]}, + "ErrorModel": { + "Message": $msg, + "Object": "error" + }, + "Object": "error" + })) }}; - ($msg:expr) => { err!("unknown_error", $msg) } +} + +#[macro_export] +macro_rules! err { + ($msg:expr) => {{ + error!("{}", $msg); + _err_object!($msg) + }}; + ($usr_msg:expr, $log_value:expr) => {{ + error!("{}: {:#?}", $usr_msg, $log_value); + _err_object!($usr_msg) + }} } #[macro_export] From f2ab25085d63d634d1abb85a8defeb229101a4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 11 Dec 2018 16:42:52 +0100 Subject: [PATCH 22/24] Updated dependencies, and dockerfiles to use NodeJS 10 LTS --- Cargo.lock | 140 ++++++++++++++++++++++----------------------- Cargo.toml | 4 +- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.alpine | 2 +- Dockerfile.armv7 | 2 +- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8af51f8..a6521f0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ name = "aho-corasick" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -41,7 +41,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -52,7 +52,7 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -110,8 +110,8 @@ dependencies = [ "rmpv 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "syslog 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "u2f 0.1.2 (git+https://github.com/wisespace-io/u2f-rs?rev=75b9fa5afb4c5)", @@ -125,7 +125,7 @@ name = "buf_redux" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -217,7 +217,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -225,7 +225,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -242,7 +242,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -252,7 +252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -260,7 +260,7 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -507,7 +507,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -536,7 +536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -544,7 +544,7 @@ name = "fsevent-sys" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -626,7 +626,7 @@ name = "hostname" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -735,7 +735,7 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -746,7 +746,7 @@ name = "inotify-sys" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -754,7 +754,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -779,7 +779,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -797,8 +797,8 @@ dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -841,8 +841,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -863,7 +863,7 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.44" +version = "0.2.45" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -918,11 +918,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -997,7 +997,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1022,7 +1022,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1078,7 +1078,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1095,7 +1095,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1128,7 +1128,7 @@ name = "nom" version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1142,7 +1142,7 @@ dependencies = [ "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1186,7 +1186,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1210,7 +1210,7 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1225,7 +1225,7 @@ version = "0.9.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1267,7 +1267,7 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1278,7 +1278,7 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1416,7 +1416,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1426,7 +1426,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1437,7 +1437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1449,7 +1449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1526,7 +1526,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1565,7 +1565,7 @@ dependencies = [ "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1581,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1611,7 +1611,7 @@ dependencies = [ "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rocket_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1644,7 +1644,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1672,7 +1672,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1775,7 +1775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1785,7 +1785,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1803,12 +1803,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.80" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.80" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1823,7 +1823,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1833,7 +1833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1954,7 +1954,7 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1974,7 +1974,7 @@ version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1986,7 +1986,7 @@ name = "thread-id" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2012,7 +2012,7 @@ name = "time" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2104,7 +2104,7 @@ name = "tokio-reactor" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2135,7 +2135,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2148,7 +2148,7 @@ name = "tokio-timer" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2176,7 +2176,7 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2190,7 +2190,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2208,7 +2208,7 @@ name = "twoway" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2239,8 +2239,8 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2514,7 +2514,7 @@ dependencies = [ "checksum crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91d5240c6975ef33aeb5f148f35275c25eda8e8a5f95abe421978b05b8bf192" "checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" "checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" -"checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" +"checksum crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e07fc155212827475223f0bcfae57e945e694fc90950ddf3f6695bbfd5555c72" "checksum crypto-mac 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dba62c86c26dcba13c278afcaac0c7452486fe604a2668a0dfa4e0edc98d8a9e" "checksum data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67df0571a74bf0d97fb8b2ed22abdd9a48475c96bd327db968b7d9cace99655e" "checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" @@ -2579,14 +2579,14 @@ dependencies = [ "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum lettre 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" "checksum lettre_email 0.9.0 (git+https://github.com/lettre/lettre?rev=c988b1760ad81)" = "" -"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" +"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74" "checksum libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "bff3ac7d6f23730d3b533c35ed75eef638167634476a499feef16c428d74b57b" "checksum libsqlite3-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d3711dfd91a1081d2458ad2d06ea30a8755256e74038be2ad927d94e1c955ca8" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" +"checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum migrations_internals 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8cf7c8c4f83fa9f47440c0b4af99973502de55e6e7b875f693bd263e03f93e7e" "checksum migrations_macros 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79f12499ef7353bdeca2d081bc61edd8351dac09a33af845952009b5a3d68c1a" @@ -2679,8 +2679,8 @@ dependencies = [ "checksum security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab01dfbe5756785b5b4d46e0289e5a18071dfa9a7c2b24213ea00b9ef9b665bf" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" -"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" +"checksum serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa52f19aee12441d5ad11c9a00459122bd8f98707cadf9778c540674f1935b6" +"checksum serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "96a7f9496ac65a2db5929afa087b54f8fc5008dcfbe48a8874ed20049b0d6154" "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" "checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" "checksum sha-1 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8347606816471548cd60f0abd5ef0d513a81f5202dbdab9c09f17a15b5248484" diff --git a/Cargo.toml b/Cargo.toml index 376d5677..d012d27c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,8 +28,8 @@ rmpv = "0.4.0" chashmap = "2.2.0" # A generic serialization/deserialization framework -serde = "1.0.80" -serde_derive = "1.0.80" +serde = "1.0.82" +serde_derive = "1.0.82" serde_json = "1.0.33" # Logging diff --git a/Dockerfile b/Dockerfile index 23eec217..36936a73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:8-alpine as vault +FROM node:10-alpine as vault ENV VAULT_VERSION "v2.6.1" diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 03e6dc9a..0c41c119 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,7 +2,7 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:8-alpine as vault +FROM node:10-alpine as vault ENV VAULT_VERSION "v2.6.1" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 3cf6eaf2..9e4e5982 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -2,7 +2,7 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:8-alpine as vault +FROM node:10-alpine as vault ENV VAULT_VERSION "v2.6.1" diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index ddabe6cb..28bbe52e 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -2,7 +2,7 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:8-alpine as vault +FROM node:10-alpine as vault ENV VAULT_VERSION "v2.6.1" From e26e2319da6a6197348ac077a9a337cf976d2c85 Mon Sep 17 00:00:00 2001 From: algebro Date: Tue, 11 Dec 2018 15:20:06 -0500 Subject: [PATCH 23/24] Close #264. Usernames and IP addresses are logged on successful authentication --- src/api/identity.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/identity.rs b/src/api/identity.rs index 01e37061..ecdf37cb 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -129,6 +129,7 @@ fn _password_login(data: ConnectData, conn: DbConn, ip: ClientIp) -> JsonResult result["TwoFactorToken"] = Value::String(token); } + info!("User {} logged in successfully. IP: {}", username, ip.ip); Ok(Json(result)) } From 4e827e4f8ab4c5d3daf22de8753d9d585772dcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Wed, 12 Dec 2018 22:15:54 +0100 Subject: [PATCH 24/24] Implement better retry and use it while saving device --- src/db/models/attachment.rs | 34 ++++++++-------------------------- src/db/models/device.rs | 12 +++++++++--- src/util.rs | 29 ++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index 5cec96c7..6530fafc 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -64,33 +64,15 @@ impl Attachment { } pub fn delete(self, conn: &DbConn) -> QueryResult<()> { - use crate::util; - use std::{thread, time}; + crate::util::retry( + || { + diesel::delete(attachments::table.filter(attachments::id.eq(&self.id))) + .execute(&**conn) + }, + 10, + )?; - let mut retries = 10; - - loop { - match diesel::delete( - attachments::table.filter( - attachments::id.eq(&self.id) - ) - ).execute(&**conn) { - Ok(_) => break, - Err(err) => { - if retries < 1 { - error!("Failed with 10 retries"); - return Err(err) - } else { - retries -= 1; - info!("Had to retry! Retries left: {}", retries); - thread::sleep(time::Duration::from_millis(500)); - continue - } - } - } - } - - util::delete_file(&self.get_file_path()); + crate::util::delete_file(&self.get_file_path()); Ok(()) } diff --git a/src/db/models/device.rs b/src/db/models/device.rs index b415d5e7..7f2552e4 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -101,7 +101,6 @@ impl Device { amr: vec!["Application".into()], }; - (encode_jwt(&claims), DEFAULT_VALIDITY.num_seconds()) } } @@ -116,8 +115,15 @@ impl Device { pub fn save(&mut self, conn: &DbConn) -> QueryResult<()> { self.updated_at = Utc::now().naive_utc(); - diesel::replace_into(devices::table) - .values(&*self).execute(&**conn).and(Ok(())) + crate::util::retry( + || { + diesel::replace_into(devices::table) + .values(&*self) + .execute(&**conn) + }, + 10, + ) + .and(Ok(())) } pub fn delete(self, conn: &DbConn) -> QueryResult<()> { diff --git a/src/util.rs b/src/util.rs index e43dbcac..a4d96a3c 100644 --- a/src/util.rs +++ b/src/util.rs @@ -252,6 +252,33 @@ fn upcase_value(value: &Value) -> Value { fn _process_key(key: &str) -> String { match key.to_lowercase().as_ref() { "ssn" => "SSN".into(), - _ => self::upcase_first(key) + _ => self::upcase_first(key), + } +} + +// +// Retry methods +// + +pub fn retry(func: F, max_tries: i32) -> Result +where + F: Fn() -> Result, +{ + use std::{thread::sleep, time::Duration}; + let mut tries = 0; + + loop { + match func() { + ok @ Ok(_) => return ok, + err @ Err(_) => { + tries += 1; + + if tries >= max_tries { + return err; + } + + sleep(Duration::from_millis(500)); + } + } } }