Accept newer versions of base64 dependency

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/501/head
Manos Pitsidianakis 2 weeks ago
parent 6cfe4da0c1
commit 27486f2908
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

14
Cargo.lock generated

@ -245,12 +245,6 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
version = "0.22.1"
@ -1052,7 +1046,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5b3f6b7f1c1dcba79867482c6fd94c0539b0115752397a7e7d0aff20f7e04d"
dependencies = [
"abnf-core",
"base64 0.22.1",
"base64",
"chrono",
"imap-types",
"log",
@ -1065,7 +1059,7 @@ version = "2.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dafc29c11ece4433e74bf11b750cbd3135b0cf342975e29503503a1489cb00b"
dependencies = [
"base64 0.22.1",
"base64",
"bounded-static",
"bounded-static-derive",
"chrono",
@ -1366,7 +1360,7 @@ version = "0.8.7"
dependencies = [
"async-fn-stream",
"async-io",
"base64 0.13.1",
"base64",
"bitflags 2.6.0",
"cfg-if",
"chrono",
@ -1958,7 +1952,7 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425"
dependencies = [
"base64 0.22.1",
"base64",
"rustls-pki-types",
]

@ -20,7 +20,7 @@ path = "src/lib.rs"
[dependencies]
async-fn-stream = { version = "=0.2.2" }
async-io = { version = "2" }
base64 = { version = "^0.13", optional = true }
base64 = { version = ">= 0.13, <= 0.22", optional = true }
bitflags = { version = "2.4", features = ["serde"] }
cfg-if = { version = "^1.0.0" }
chrono = { version = "^0.4", default-features = false }

@ -100,6 +100,7 @@ fn encode_modified_utf7(text: &str) -> String {
for value in text_u16 {
input.extend_from_slice(&value.to_be_bytes());
}
#[allow(deprecated)]
let text_u16 = base64::encode(input);
let text_u16 = text_u16.trim_end_matches('=');
let result = text_u16.replace('/', ",");
@ -134,6 +135,7 @@ fn decode_utf7_part(text: &str) -> String {
text_b64 += "=";
}
#[allow(deprecated)]
let text_u16 = base64::decode(text_b64).unwrap();
let (cow, _encoding_used, _had_errors) = UTF_16BE.decode(&text_u16);
let result = cow.as_ref();

@ -447,6 +447,7 @@ impl ImapStream {
))
.set_kind(ErrorKind::Authentication));
}
#[allow(deprecated)]
let xoauth2 = base64::decode(&server_conf.server_password)
.chain_err_summary(|| {
"Could not decode `server_password` from base64. Is the value correct?"

@ -518,11 +518,13 @@ impl SmtpConnection {
ret.read_lines(&mut res, Some((ReplyCode::_334, &[])))
.await
.chain_err_kind(ErrorKind::Authentication)?;
#[allow(deprecated)]
let buf = base64::encode(&username);
ret.send_command(&[buf.as_bytes()]).await?;
ret.read_lines(&mut res, Some((ReplyCode::_334, &[])))
.await
.chain_err_kind(ErrorKind::Authentication)?;
#[allow(deprecated)]
let buf = base64::encode(&password);
ret.send_command(&[buf.as_bytes()]).await?;
} else {
@ -539,6 +541,7 @@ impl SmtpConnection {
buf.extend(username.as_bytes().to_vec());
buf.push(b'\0');
buf.extend(password);
#[allow(deprecated)]
base64::encode(buf)
};
ret.send_command(&[b"AUTH PLAIN ", username_password.as_bytes()])

Loading…
Cancel
Save