Skip to content

fix(api-core): move http encoding into transcode method - #18218

Merged
daniel-sanche merged 35 commits into
mainfrom
fix_expand_uri_encoding
Aug 25, 2026
Merged

fix(api-core): move http encoding into transcode method#18218
daniel-sanche merged 35 commits into
mainfrom
fix_expand_uri_encoding

Conversation

@daniel-sanche

Copy link
Copy Markdown
Contributor

In the yanked api-core release, http encoding was added to path_template.expand. This method is used for grpc requests in firestore, which lead to a bug.

This PR moves the encoding logic into transcode, which is the intended place for http encoding logic

Fixes #18213
Fixes #18207

@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 introduces path traversal validation to prevent '.' and '..' segments in path template wildcards, and adds percent-encoding support to URI variable transcoding within google/api_core/path_template.py. Additionally, comprehensive unit tests have been added to verify these validation rules and encoding behaviors. There are no review comments, so we have no feedback to provide.

@daniel-sanche
daniel-sanche marked this pull request as ready for review August 25, 2026 19:02
@daniel-sanche
daniel-sanche requested a review from a team as a code owner August 25, 2026 19:02
@daniel-sanche
daniel-sanche merged commit 082a99a into main Aug 25, 2026
44 checks passed
@daniel-sanche
daniel-sanche deleted the fix_expand_uri_encoding branch August 25, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants