Skip to content

Commit

Permalink
Update base64 lib and fix compilation failure in flight_sql.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedriza committed Oct 20, 2023
1 parent 1063e0a commit 4349936
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ballista/scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion ballista/scheduler/src/flight_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"))?;
Expand Down

0 comments on commit 4349936

Please sign in to comment.