grpc / grpc-go

The Go language implementation of gRPC. HTTP/2 based RPC

Home Page:https://grpc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

header key "XXX" contains value with non-printable ASCII characters

Linzai99 opened this issue · comments

this problem occurs for upgraded grpc version,when rollback to 1.26.0 works well.non-printable ASCII characters maybe form Older clients

NOTE: if you are reporting is a potential security vulnerability or a crash,
please follow our CVE process at
https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md instead of
filing an issue here.

Please see the FAQ in our main README.md, then answer the questions below
before submitting your issue.

What version of gRPC are you using?

v1.59.0

What version of Go are you using (go version)?

1.21.3

What operating system (Linux, Windows, …) and version?

Linux

What did you do?

If possible, provide a recipe for reproducing the error.

What did you expect to see?

it works well

What did you see instead?

grpc 1.26.0 works well

@Linzai99 Thanks for writing in. We have removed this in the latest versions. gRPC protocol has restrictions on allowable characters in headers(as per grpc spec here). The value "ЖОПА" contains Cyrillic characters that fall outside the printable ASCII range. One way could be to encode such values and send that as part of metadata from client side but make sure to handle it on server side as well, or use a -bin header.