You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aws-sigv4 crate currently implements the Display trait for formatting the canonical request, and since it's using ToString to do the actual formatting, it will panic if there's any error during that formatting.
In #710, we fixed a bug where header values that contained non-ASCII characters would cause a panic, but the problem was just punted a little bit since now it can panic if there's invalid UTF-8 in the header value.
Options we should evaluate and choose from:
Refactor CanonicalRequest to have a fallible format function instead of implementing Display, and bubble the error up.
Refactor CanonicalRequest to have an infallible format function, but produce bytes instead of a string, and put the header value's bytes directly into the formatted canonical request.
The text was updated successfully, but these errors were encountered:
This commit addresses panic in the case of formatting a CanonicalRequest
containing invalid UTF-8 in the header value.
The commit aims for the least disturbance to the codebase in order to
pass a given failing test in the PR. We want to quickly determine if
this low-cost approach addresses the problem before we commit ourselves
to start refactoring CanonicalRequest to have a special format function.
Fixessmithy-lang#711
The aws-sigv4 crate currently implements the
Display
trait for formatting the canonical request, and since it's usingToString
to do the actual formatting, it will panic if there's any error during that formatting.In #710, we fixed a bug where header values that contained non-ASCII characters would cause a panic, but the problem was just punted a little bit since now it can panic if there's invalid UTF-8 in the header value.
Options we should evaluate and choose from:
CanonicalRequest
to have a fallible format function instead of implementingDisplay
, and bubble the error up.CanonicalRequest
to have an infallible format function, but produce bytes instead of a string, and put the header value's bytes directly into the formatted canonical request.The text was updated successfully, but these errors were encountered: