diff --git a/ballista/scheduler/Cargo.toml b/ballista/scheduler/Cargo.toml index c7ee94bc2..9883ef09d 100644 --- a/ballista/scheduler/Cargo.toml +++ b/ballista/scheduler/Cargo.toml @@ -47,7 +47,7 @@ arrow-flight = { workspace = true } async-recursion = "1.0.0" async-trait = "0.1.41" ballista-core = { path = "../core", version = "0.11.0", features = ["s3"] } -base64 = { version = "0.13", default-features = false } +base64 = { version = "0.21", default-features = false } clap = { version = "3", features = ["derive", "cargo"] } configure_me = { workspace = true } dashmap = "5.4.0" diff --git a/ballista/scheduler/src/flight_sql.rs b/ballista/scheduler/src/flight_sql.rs index 942930a17..2c3d02ce5 100644 --- a/ballista/scheduler/src/flight_sql.rs +++ b/ballista/scheduler/src/flight_sql.rs @@ -35,6 +35,7 @@ use arrow_flight::{ Action, FlightData, FlightDescriptor, FlightEndpoint, FlightInfo, HandshakeRequest, HandshakeResponse, Location, Ticket, }; +use base64::{engine::general_purpose, Engine as _}; use log::{debug, error, warn}; use std::convert::TryFrom; use std::pin::Pin; @@ -504,7 +505,8 @@ impl FlightSqlService for FlightSqlServiceImpl { )))?; } let base64 = &authorization[basic.len()..]; - let bytes = base64::decode(base64) + let bytes = general_purpose::STANDARD + .decode(base64) .map_err(|_| Status::invalid_argument("authorization not parsable"))?; let str = String::from_utf8(bytes) .map_err(|_| Status::invalid_argument("authorization not parsable"))?;