From 05ee4a4cee7e7b10e07032fabd50b248674495fe Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Thu, 6 Feb 2020 23:20:26 +0200 Subject: [PATCH] chore(*): update the dependencies --- Cargo.toml | 7 ++++--- src/installed.rs | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a75e7e4..a292909 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,18 +11,19 @@ license = "MIT OR Apache-2.0" edition = "2018" [dependencies] -base64 = "0.10" +base64 = "0.11" chrono = { version = "0.4", features = ["serde"] } http = "0.2" hyper = "0.13.1" hyper-rustls = "0.19" log = "0.4" rustls = "0.16" -seahash = "3.0.6" +seahash = "4" serde = {version = "1.0", features = ["derive"]} serde_json = "1.0" tokio = { version = "0.2", features = ["fs", "macros", "io-std", "time"] } -url = "1" +url = "2" +percent-encoding = "2" [dev-dependencies] httptest = "0.11.1" diff --git a/src/installed.rs b/src/installed.rs index 3611162..be67bdc 100644 --- a/src/installed.rs +++ b/src/installed.rs @@ -13,7 +13,9 @@ use std::sync::{Arc, Mutex}; use hyper::header; use tokio::sync::oneshot; use url::form_urlencoded; -use url::percent_encoding::{percent_encode, QUERY_ENCODE_SET}; +use percent_encoding::{percent_encode, AsciiSet, CONTROLS}; + +const QUERY_SET: AsciiSet = CONTROLS.add(b' ').add(b'"').add(b'#').add(b'<').add(b'>'); const OOB_REDIRECT_URI: &str = "urn:ietf:wg:oauth:2.0:oob"; @@ -42,7 +44,7 @@ where ] .into_iter() .fold(url, |mut u, param| { - u.push_str(&percent_encode(param.as_ref(), QUERY_ENCODE_SET).to_string()); + u.push_str(&percent_encode(param.as_ref(), &QUERY_SET).to_string()); u }) }