gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

prevent 0xa api_key suffix in api_key

Open ohmayr opened this issue 6 months ago • 0 comments

Determine this is the right repository

  • [x] I determined this is the correct repository in which to report this bug.

Summary of the issue

if a 0xa character appears at the end of the api_key, the underlying grpc implementation will fail with an invalid value header error.

see: https://gitlab.uni-hannover.de/tci-gateway-module/grpc/-/blob/v1.9.x/src/core/lib/surface/validate_metadata.cc#L84

to reproduce this, simply add a 0xa character to an api_key and try to perform any generative action via grpc transport.

Related PR for more context: https://github.com/googleapis/google-cloud-python/pull/13963.

ohmayr avatar Jun 23 '25 16:06 ohmayr