Content-Length: 270794 | pFad | http://github.com/googleapis/google-cloud-python/pull/13963

54 fix! [google-ai-generativelanguage] prevent 0xa api_key suffix by pnikonowicz · Pull Request #13963 · googleapis/google-cloud-python · GitHub
Skip to content

fix! [google-ai-generativelanguage] prevent 0xa api_key suffix #13963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pnikonowicz
Copy link

@pnikonowicz pnikonowicz commented May 31, 2025

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.

@pnikonowicz pnikonowicz requested a review from a team as a code owner May 31, 2025 22:49
Copy link

google-cla bot commented May 31, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pnikonowicz pnikonowicz force-pushed the invalid_newline_char branch from 78cb52e to 12f1e33 Compare May 31, 2025 22:51
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 x0a character to an api_key
and try to perform any generative action.
@pnikonowicz pnikonowicz force-pushed the invalid_newline_char branch from 12f1e33 to 9867dad Compare May 31, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/google-cloud-python/pull/13963

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy