From f31d2d09a304df1f8bbc0b1f85fff120768aba33 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 2 Jun 2023 15:47:35 +0200 Subject: [PATCH 1/3] Update base64 --- Cargo.toml | 2 +- src/signing.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 44d83b9..e5f54d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ doctest = false [dependencies] # Follows version used by rustls -base64 = "0.13" +base64 = "0.21" # Follows version used by http bytes = "1.0" futures-util = { version = "0.3", optional = true, features = ["io"] } diff --git a/src/signing.rs b/src/signing.rs index 0ae7d61..a3f6d07 100644 --- a/src/signing.rs +++ b/src/signing.rs @@ -108,7 +108,9 @@ impl ServiceAccount { }, ); - let key_bytes = base64::decode_config(key_string.as_bytes(), base64::STANDARD) + use base64::Engine; + let key_bytes = base64::engine::general_purpose::STANDARD + .decode(key_string.as_bytes()) .map_err(Error::Base64Decode)?; Ok(Self { From 03663d13f8d70ef17b9205d408d8c6516c0d8a9d Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 2 Jun 2023 15:49:52 +0200 Subject: [PATCH 2/3] Fix lints --- src/v1/common.rs | 9 ++------- src/v1/objects.rs | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/v1/common.rs b/src/v1/common.rs index e777e8c..449610a 100644 --- a/src/v1/common.rs +++ b/src/v1/common.rs @@ -132,17 +132,12 @@ pub enum PredefinedAcl { } /// Set of properties to return. Defaults to `NoAcl`. -#[derive(Serialize, Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Serialize, Copy, Clone, Debug, PartialEq, Eq, Default)] #[serde(rename_all = "camelCase")] pub enum Projection { /// Include all properties. Full, /// Omit the owner, acl property. + #[default] NoAcl, } - -impl Default for Projection { - fn default() -> Self { - Projection::NoAcl - } -} diff --git a/src/v1/objects.rs b/src/v1/objects.rs index def2efe..4293c4c 100644 --- a/src/v1/objects.rs +++ b/src/v1/objects.rs @@ -11,8 +11,8 @@ macro_rules! __make_obj_url { format!( $url, $authority.as_str(), - percent_encoding::percent_encode($id.bucket().as_ref(), crate::util::PATH_ENCODE_SET), - percent_encoding::percent_encode($id.object().as_ref(), crate::util::PATH_ENCODE_SET) + percent_encoding::percent_encode($id.bucket().as_ref(), $crate::util::PATH_ENCODE_SET), + percent_encoding::percent_encode($id.object().as_ref(), $crate::util::PATH_ENCODE_SET) ) }}; } From 8025a1744305542ad03bf54b85f4d03a96599ea7 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 2 Jun 2023 15:55:33 +0200 Subject: [PATCH 3/3] Fix deny --- deny.toml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/deny.toml b/deny.toml index 7b8a3e1..35177c5 100644 --- a/deny.toml +++ b/deny.toml @@ -22,8 +22,6 @@ deny = [ { name = "openssl-sys" }, ] skip = [ - # hyper uses an old version...and the newest version - { name = "itoa", version = "=0.4.8" }, ] skip-tree = [] @@ -35,13 +33,13 @@ allow = [ "Apache-2.0", "MIT", "BSD-3-Clause", + "ISC", ] exceptions = [ { allow = ["MPL-2.0"], name = "webpki-roots" }, - { allow = ["ISC"], name = "untrusted" }, - { allow = ["ISC"], name = "webpki" }, - { allow = ["ISC", "MIT", "OpenSSL"], name = "ring" }, + { allow = ["OpenSSL"], name = "ring" }, { allow = ["Zlib"], name = "tinyvec" }, + { allow = ["Unicode-DFS-2016"], name = "unicode-ident" }, ] [[licenses.clarify]] @@ -65,6 +63,13 @@ license-files = [ { path = "LICENSE", hash = 0x001c7e6c }, ] +[[licenses.clarify]] +name = "rustls-webpki" +expression = "ISC" +license-files = [ + { path = "LICENSE", hash = 0x001c7e6c }, +] + [[licenses.clarify]] name = "encoding_rs" expression = "(Apache-2.0 OR MIT) AND BSD-3-Clause"