tsibelman / aws-signer-v4-dot-net

Sign HttpRequestMessage using AWS Signature v4 using request information and credentials.
Apache License 2.0
72 stars 27 forks source link

Fix Querystring Arrays #25

Closed jlagnese-allata closed 4 years ago

jlagnese-allata commented 4 years ago

Fixes scenario where query string arrays (i.e. query strings with multiple paramaters with the same name) would cause invalid signatures.

This was happening because HttpUtility.ParseQueryString(...) inserts commas into the value when there are multiple values present. Instead of repeating the key=value pair in the canonical string, the algorithm was just encoding the commas into one giant value for each query parameter with multiple values.