Skip to content

fix(client-options): validate mutually exclusive options passed via from_dict - #19267

Open
adityajai119 wants to merge 1 commit into
googleapis:mainfrom
adityajai119:fix-client-options-from-dict-validation
Open

adityajai119 wants to merge 1 commit into
googleapis:mainfrom
adityajai119:fix-client-options-from-dict-validation

Conversation

@adityajai119

Copy link
Copy Markdown

\ClientOptions.from_dict()\ assigned each supplied key directly on a new instance, bypassing the mutual-exclusivity checks performed by \ClientOptions.init. As a result, dictionaries containing both \�pi_key\ and \credentials_file, or both \client_cert_source\ and \client_encrypted_cert_source, were silently accepted. This moves those checks into a shared _validate_options()\ method called by both the constructor and \ rom_dict(), so both entry points enforce the same rules.

@adityajai119
adityajai119 requested a review from a team as a code owner November 29, 2026 17:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@adityajai119

Copy link
Copy Markdown
Author

Thanks for the finding. We're leaving this as-is for now and will address it only if a maintainer requests it.

This branch has not been deployed

No deployments
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