Skip to content

Commit

Permalink
Merge branch 'fix-audit-65'
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Mar 29, 2024
2 parents 56a0250 + 9ccc90c commit efe384b
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 178 deletions.
238 changes: 140 additions & 98 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/phactory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async-trait = "0.1.57"
phala-scheduler = { path = "../phala-scheduler" }
sgx-api-lite = { path = "../sgx-api-lite" }
sgx-attestation = { path = "../sgx-attestation" }
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "socks", "trust-dns"] }
reqwest = { version = "0.11.27", default-features = false, features = ["rustls-tls", "socks", "hickory-dns"] }
reqwest-env-proxy = { path = "../reqwest-env-proxy" }
libc = "0.2"

Expand Down
2 changes: 1 addition & 1 deletion crates/phactory/src/prpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ impl<Platform: pal::Platform + Serialize + DeserializeOwned> PhactoryApi for Rpc
let url: reqwest::Url = request.url.parse().map_err(from_debug)?;

let client = reqwest::Client::builder()
.trust_dns(true)
.hickory_dns(true)
.env_proxy(url.host_str().unwrap_or_default())
.build()
.map_err(from_debug)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/pink/chain-extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"
pink = { version = "0.4.1", path = "../pink" }
reqwest-env-proxy = { version = "0.1", path = "../../reqwest-env-proxy" }
sp-core = { version = "21", features = ["full_crypto"] }
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "socks", "trust-dns"] }
reqwest = { version = "0.11.27", default-features = false, features = ["rustls-tls", "socks", "hickory-dns"] }
log = "0.4"
getrandom = "0.2"
once_cell = "1.10.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/pink/chain-extension/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async fn async_http_request(
let timeout = Duration::from_millis(timeout_ms);
let url: reqwest::Url = request.url.parse().or(Err(HttpRequestError::InvalidUrl))?;
let client = reqwest::Client::builder()
.trust_dns(true)
.hickory_dns(true)
.timeout(timeout)
.env_proxy(url.host_str().unwrap_or_default())
.build()
Expand Down
4 changes: 2 additions & 2 deletions crates/sgx-attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ anyhow = { version = "1", optional = true }
ring = { version = "0.16.20", optional = true, default-features = false, features = [
"alloc",
] }
reqwest = { version = "0.11", optional = true, default-features = false, features = [
reqwest = { version = "0.11.27", optional = true, default-features = false, features = [
"rustls-tls",
"blocking",
"trust-dns",
"hickory-dns",
] }
urlencoding = { version = "2", optional = true }
serde_json = { version = "1.0.108", optional = true, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/sgx-attestation/src/ias/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn get_report_from_intel(quote: &[u8], timeout: Duration) -> Result<(String, Str
let url: reqwest::Url = format!("https://{IAS_HOST}{IAS_REPORT_ENDPOINT}").parse()?;
info!(from=%url, "Getting RA report");
let mut res = reqwest::blocking::Client::builder()
.trust_dns(true)
.hickory_dns(true)
.timeout(Some(timeout))
.env_proxy(url.domain().unwrap_or_default())
.build()
Expand Down
Loading

0 comments on commit efe384b

Please sign in to comment.