build(deps): Bump base64 from 0.21.7 to 0.22.0 in /rust (#3935)

Bumps [base64](https://github.com/marshallpierce/rust-base64) from
0.21.7 to 0.22.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md">base64's
changelog</a>.</em></p>
<blockquote>
<h1>0.22.0</h1>
<ul>
<li><code>DecodeSliceError::OutputSliceTooSmall</code> is now
conservative rather than precise. That is, the error will only occur if
the decoded output <em>cannot</em> fit, meaning that
<code>Engine::decode_slice</code> can now be used with exactly-sized
output slices. As part of this, <code>Engine::internal_decode</code> now
returns <code>DecodeSliceError</code> instead of
<code>DecodeError</code>, but that is not expected to affect any
external callers.</li>
<li><code>DecodeError::InvalidLength</code> now refers specifically to
the <em>number of valid symbols</em> being invalid (i.e. <code>len % 4
== 1</code>), rather than just the number of input bytes. This avoids
confusing scenarios when based on interpretation you could make a case
for either <code>InvalidLength</code> or <code>InvalidByte</code> being
appropriate.</li>
<li>Decoding is somewhat faster (5-10%)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5d70ba7576"><code>5d70ba7</code></a>
Merge pull request <a
href="https://redirect.github.com/marshallpierce/rust-base64/issues/269">#269</a>
from marshallpierce/mp/decode-precisely</li>
<li><a
href="efb6c006c7"><code>efb6c00</code></a>
Release notes</li>
<li><a
href="2b91084a31"><code>2b91084</code></a>
Add some tests to boost coverage</li>
<li><a
href="9e9c7abe65"><code>9e9c7ab</code></a>
Engine::internal_decode now returns DecodeSliceError</li>
<li><a
href="a8a60f43c5"><code>a8a60f4</code></a>
Decode main loop improvements</li>
<li><a
href="a25be0667c"><code>a25be06</code></a>
Simplify leftover output writes</li>
<li><a
href="9979cc33bb"><code>9979cc3</code></a>
Keep morsels as separate bytes</li>
<li><a
href="37670c5ec2"><code>37670c5</code></a>
Bump dev toolchain version (<a
href="https://redirect.github.com/marshallpierce/rust-base64/issues/268">#268</a>)</li>
<li>See full diff in <a
href="https://github.com/marshallpierce/rust-base64/compare/v0.21.7...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=base64&package-manager=cargo&previous-version=0.21.7&new-version=0.22.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
dependabot[bot]
2024-03-05 23:29:22 -03:00
committed by GitHub
parent fc322f7cf6
commit 26c10fb361
5 changed files with 15 additions and 7 deletions

12
rust/Cargo.lock generated
View File

@@ -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",

View File

@@ -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"] }

View File

@@ -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))

View File

@@ -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"

View File

@@ -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"