Skip to content

fix(Google.Cloud.Spanner.Data): validate AutoGeneratedCommandTable in SpannerDataAdapter.GetBuiltSelectCommand - #16156

Open
robertvoinescu-work wants to merge 1 commit into
mainfrom
fix/b593457485
Open

robertvoinescu-work wants to merge 1 commit into
mainfrom
fix/b593457485

Conversation

@robertvoinescu-work

Copy link
Copy Markdown
Contributor

b/593457485

@robertvoinescu-work
robertvoinescu-work marked this pull request as ready for review December 4, 2026 22:04
@robertvoinescu-work
robertvoinescu-work requested a review from a team as a code owner December 4, 2026 22:04

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances security and robustness in SpannerDataAdapter by validating the table name before constructing the auto-generated SELECT command. To achieve this, SpannerCommandTextBuilder.ValidateTableName was changed from private to internal. Additionally, _builtSelectCommand is now properly cleared in ClearBuiltCommands(), and new unit tests have been added to verify table name validation and dynamic table name updates. There are no review comments, and the changes look correct.

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.

2 participants