diff options
author | asonix <asonix@asonix.dog> | 2024-03-03 14:35:01 -0600 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-04 14:29:14 +0100 |
commit | 6ab80cd36a702877d647e1b9273a595b893cc783 (patch) | |
tree | e52b9817c090357f2646fe2e2398933d7de3ee20 /src/api/signature | |
parent | e28599497702ab541f652d9d5ae097049b3b804d (diff) | |
download | garage-6ab80cd36a702877d647e1b9273a595b893cc783.tar.gz garage-6ab80cd36a702877d647e1b9273a595b893cc783.zip |
Lowercase query parameter keys when parsing
Diffstat (limited to 'src/api/signature')
-rw-r--r-- | src/api/signature/payload.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs index 03884186..eacb7d68 100644 --- a/src/api/signature/payload.rs +++ b/src/api/signature/payload.rs @@ -196,7 +196,7 @@ pub fn parse_query_map(uri: &http::uri::Uri) -> Result<QueryMap, Error> { if let Some(query_str) = uri.query() { let query_pairs = url::form_urlencoded::parse(query_str.as_bytes()); for (key, val) in query_pairs { - if query.insert(key.to_string(), val.into_owned()).is_some() { + if query.insert(key.to_lowercase().to_string(), val.into_owned()).is_some() { return Err(Error::bad_request(format!( "duplicate query parameter: `{}`", key |