Compare commits

...

1 commit

View file

@ -165,9 +165,9 @@ fn parse_authorization(
} }
fn parse_query_authorization(headers: &HashMap<String, String>) -> Result<Authorization, Error> { fn parse_query_authorization(headers: &HashMap<String, String>) -> Result<Authorization, Error> {
let algo = headers let algo = headers.get("x-amz-algorithm").ok_or_else(|| {
.get("x-amz-algorithm") Error::Forbidden("Garage does not support anonymous users yet".to_owned())
.ok_or_bad_request("X-Amz-Algorithm not found in query parameters")?; })?;
if algo != "AWS4-HMAC-SHA256" { if algo != "AWS4-HMAC-SHA256" {
return Err(Error::BadRequest( return Err(Error::BadRequest(
"Unsupported authorization method".to_string(), "Unsupported authorization method".to_string(),