-
Notifications
You must be signed in to change notification settings - Fork 310
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
Fix: Less restrictive content-type header check for google authentication (ignores charset) #1382
Fix: Less restrictive content-type header check for google authentication (ignores charset) #1382
Conversation
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. |
@DanieleQuasimodo thank you for your PR. Could you add some unit tests to cover your change (for example, https://github.com/googleapis/google-auth-library-python/blob/main/tests/test__helpers.py and https://github.com/googleapis/google-auth-library-python/blob/main/tests/compute_engine/test__metadata.py). |
Sure, no problem! Yesterday I was a bit rushed and completely forgot about it. |
3b544e2
to
6b96023
Compare
…lpers and its use in _metadata
6b96023
to
bda4f39
Compare
These should do. The forced push to my fork was just because I'm dumb, committed with the wrong account and had to ammend the author (so Google CLA is happy) 😅 |
@DanieleQuasimodo The PR looks great, thanks! Could you run |
@arithmetic1728 I think now it should be ok. |
Less restrictive content-type header check for google authentication (now only the media-type is compared, ignoring charset, boundary, etc).
Should fix issue #1089.
Implemented as suggested in PEP-594 (due to deprecation of cgi.parse_header. See https://peps.python.org/pep-0594/#cgi).