Skip to content
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

Async _fetch_certs does not decode certs - TypeError Object of type bytes is not JSON serializable #1050

Closed
lawrencealexander10 opened this issue Jun 5, 2022 · 1 comment · Fixed by #1085
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@lawrencealexander10
Copy link

return json.loads(json.dumps(data))

There is a bug in the code. The json.dumps returns a TypeError: Object of type bytes is not JSON serializable while data instead needs to be decoded data.decode('utf-8') before converting to dictionary.

The correct approach is being used in the id_token.py method.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 6, 2022
@arithmetic1728 arithmetic1728 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jun 14, 2022
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 15, 2022
@sai-sunder-s sai-sunder-s added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. 🚨 This issue needs some love. labels Jul 14, 2022
@sai-sunder-s
Copy link
Contributor

Thank you for raising this issue. We will fix the bug.

clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 20, 2022
The async _cert_fetch implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 20, 2022
The async _cert_fetch implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 21, 2022
The async `_cert_fetch` implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 21, 2022
The async `_cert_fetch` implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 21, 2022
The async `_cert_fetch` implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit to clundin25/google-auth-library-python that referenced this issue Jul 22, 2022
The async `_cert_fetch` implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves googleapis#1050.
clundin25 added a commit that referenced this issue Jul 22, 2022
The async `_cert_fetch` implementation was not properly decoding
certificates into a utf-8 string. This updates the code and tests to
decode the certificates into strings.

This resolves #1050.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants