diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 7005a4edf..607d93b7b 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -552,6 +552,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bimap" version = "0.6.3" @@ -1132,7 +1138,7 @@ version = "1.0.0" dependencies = [ "anyhow", "atomicwrites", - "base64 0.21.7", + "base64 0.22.0", "boringtun", "chrono", "dns-lookup", @@ -1949,7 +1955,7 @@ dependencies = [ "anyhow", "axum 0.7.4", "backoff", - "base64 0.21.7", + "base64 0.22.0", "bytecodec", "bytes", "clap", @@ -4379,7 +4385,7 @@ version = "1.0.0" dependencies = [ "anyhow", "backoff", - "base64 0.21.7", + "base64 0.22.0", "futures", "rand_core 0.6.4", "secrecy", diff --git a/rust/connlib/shared/Cargo.toml b/rust/connlib/shared/Cargo.toml index e5eb2c582..94fb4ab09 100644 --- a/rust/connlib/shared/Cargo.toml +++ b/rust/connlib/shared/Cargo.toml @@ -12,7 +12,7 @@ mock = [] # Will be needed to safely modify `/etc/resolv.conf` atomicwrites = "0.4.3" secrecy = { workspace = true, features = ["serde", "bytes"] } -base64 = { version = "0.21", default-features = false, features = ["std"] } +base64 = { version = "0.22", default-features = false, features = ["std"] } boringtun = { workspace = true } chrono = { workspace = true } futures = { version = "0.3", default-features = false, features = ["std", "async-await", "executor"] } diff --git a/rust/connlib/shared/src/messages/key.rs b/rust/connlib/shared/src/messages/key.rs index 58b47e574..ce8ae2ebf 100644 --- a/rust/connlib/shared/src/messages/key.rs +++ b/rust/connlib/shared/src/messages/key.rs @@ -37,7 +37,9 @@ impl FromStr for Key { // TODO: https://github.com/marshallpierce/rust-base64/issues/210 let bytes_decoded = STANDARD.decode(s)?; if bytes_decoded.len() != KEY_SIZE { - Err(Error::Base64DecodeError(base64::DecodeError::InvalidLength)) + Err(Error::Base64DecodeError( + base64::DecodeError::InvalidLength(bytes_decoded.len()), + )) } else { key_bytes.copy_from_slice(&bytes_decoded); Ok(Key(key_bytes)) diff --git a/rust/phoenix-channel/Cargo.toml b/rust/phoenix-channel/Cargo.toml index 42e6070fa..d78383af3 100644 --- a/rust/phoenix-channel/Cargo.toml +++ b/rust/phoenix-channel/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" secrecy = { workspace = true } tokio-tungstenite = { workspace = true, features = ["rustls-tls-webpki-roots"] } futures = "0.3.29" -base64 = "0.21.7" +base64 = "0.22.0" serde = { version = "1.0.196", features = ["derive"] } tracing = { workspace = true } rand_core = "0.6.4" diff --git a/rust/relay/Cargo.toml b/rust/relay/Cargo.toml index ef2bc1282..1a0f54c31 100644 --- a/rust/relay/Cargo.toml +++ b/rust/relay/Cargo.toml @@ -26,7 +26,7 @@ env_logger = "0.11.3" tracing-core = "0.1.31" bytes = "1.4.0" sha2 = "0.10.8" -base64 = "0.21.7" +base64 = "0.22.0" once_cell = "1.17.1" proptest = { version = "1.4.0", optional = true } test-strategy = "0.3.1"