proxy-wasm-rust-sdk icon indicating copy to clipboard operation
proxy-wasm-rust-sdk copied to clipboard

`hostcalls::get_map` crashes Envoy when an HTTP header value is not a UTF-8 encoded string

Open yskopets opened this issue 4 years ago • 1 comments

Summary

  • HTTP spec allows arbitrary octets in header values
  • However, Rust SDK is using String type that is limited to UTF-8 strings only
  • hostcalls::get_map panics when an HTTP request contains a header with a value that is not a UTF-8 encoded string

yskopets avatar Aug 10 '20 21:08 yskopets

Seconding this issue. Having get_http_request_headers return Result instead of being able to panic on non-UTF-8 input would be great.

haikuginger avatar Apr 10 '23 20:04 haikuginger