fix: upgrade google-gmail1 to v7 to resolve security advisory
Upgrade google-gmail1 from 6.0.0 to 7.0.0 which uses yup-oauth2 v12 that no longer depends on the unmaintained rustls-pemfile crate. This resolves RUSTSEC-2025-0134 (rustls-pemfile unmaintained). Breaking changes addressed: - Updated InstalledFlowAuthenticator to use CustomHyperClientBuilder - Added hyper-rustls with http1 feature for OAuth redirect flow Signed-off-by: Jeremiah Russell <jerry@jrussell.ie>
This commit is contained in:
committed by
Jeremiah Russell
parent
efeb118dcd
commit
e3555275fb
748
Cargo.lock
generated
748
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,8 @@ config = { version = "0.15.19", default-features = false, features = [
|
|||||||
"toml",
|
"toml",
|
||||||
] }
|
] }
|
||||||
env_logger = "0.11.8"
|
env_logger = "0.11.8"
|
||||||
google-gmail1 = "6.0.0"
|
google-gmail1 = "7.0.0"
|
||||||
|
hyper-rustls = { version = "0.27", features = ["http1"] }
|
||||||
lazy-regex = "3.4.2"
|
lazy-regex = "3.4.2"
|
||||||
log = "0.4.28"
|
log = "0.4.28"
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ use google_gmail1::{
|
|||||||
client::legacy::{Client, connect::HttpConnector},
|
client::legacy::{Client, connect::HttpConnector},
|
||||||
rt::TokioExecutor,
|
rt::TokioExecutor,
|
||||||
},
|
},
|
||||||
yup_oauth2::{InstalledFlowAuthenticator, InstalledFlowReturnMethod},
|
yup_oauth2::{CustomHyperClientBuilder, InstalledFlowAuthenticator, InstalledFlowReturnMethod},
|
||||||
};
|
};
|
||||||
|
|
||||||
mod message_summary;
|
mod message_summary;
|
||||||
@@ -259,10 +259,11 @@ impl GmailClient {
|
|||||||
let client = Client::builder(executor.clone()).build(connector.clone());
|
let client = Client::builder(executor.clone()).build(connector.clone());
|
||||||
log::trace!("file to persist tokens to `{}`", config.persist_path());
|
log::trace!("file to persist tokens to `{}`", config.persist_path());
|
||||||
|
|
||||||
|
let auth_client = Client::builder(executor).build(connector);
|
||||||
let auth = InstalledFlowAuthenticator::with_client(
|
let auth = InstalledFlowAuthenticator::with_client(
|
||||||
config.secret().clone(),
|
config.secret().clone(),
|
||||||
InstalledFlowReturnMethod::HTTPRedirect,
|
InstalledFlowReturnMethod::HTTPRedirect,
|
||||||
Client::builder(executor).build(connector),
|
CustomHyperClientBuilder::from(auth_client),
|
||||||
)
|
)
|
||||||
.persist_tokens_to_disk(config.persist_path())
|
.persist_tokens_to_disk(config.persist_path())
|
||||||
.build()
|
.build()
|
||||||
|
|||||||
Reference in New Issue
Block a user