Skip to content

Commit f1600d4

Browse files
committed
for #180: allow HTTP requests in default hyper client.
If an attacker could manipulate URLs for token retrieval etc., they could wreak considerably more havoc than a downgrade attack.
1 parent 253528a commit f1600d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/authenticator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,8 @@ mod private {
715715
AuthFlow::ServiceAccountFlow(service_account_flow) => {
716716
service_account_flow.token(hyper_client, scopes).await
717717
}
718-
AuthFlow::ApplicationDefaultCredentialsFlow(service_account_flow) => {
719-
service_account_flow.token(hyper_client, scopes).await
718+
AuthFlow::ApplicationDefaultCredentialsFlow(adc_flow) => {
719+
adc_flow.token(hyper_client, scopes).await
720720
}
721721
AuthFlow::AuthorizedUserFlow(authorized_user_flow) => {
722722
authorized_user_flow.token(hyper_client, scopes).await
@@ -780,7 +780,7 @@ impl HyperClientBuilder for DefaultHyperClient {
780780
#[cfg(feature = "hyper-rustls")]
781781
let connector = hyper_rustls::HttpsConnectorBuilder::new()
782782
.with_native_roots()
783-
.https_only()
783+
.https_or_http()
784784
.enable_http1()
785785
.enable_http2()
786786
.build();

0 commit comments

Comments
 (0)