GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(auth): validate tenant and provider IDs and URL-encode query parameters by macastelaz · Pull Request #996 · firebase/firebase-admin-python

Conversation

@macastelaz

@macastelaz macastelaz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Description

  • Validates that tenant_id and provider_id values are valid URL path segments before constructing Auth and Identity Platform management request paths.
  • Uses params dictionary / URL query encoding for list_oidc_provider_configs, list_saml_provider_configs, and project_management app listing requests so query parameters such as pageToken are properly percent-encoded.

Testing

  • Added unit tests in tests/test_tenant_mgt.py, tests/test_auth_providers.py, and tests/test_project_management.py.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@macastelaz
fix(auth): validate tenant and provider IDs and URL-encode query para…
f3e185d
…meters
@macastelaz
macastelaz requested a review from a team October 20, 2026 16:02
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Oct 20, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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 by validating tenant and provider IDs as safe URL segments and refactoring query parameter construction to use dictionaries, ensuring proper URL encoding. The review feedback suggests further improving consistency in tenant_mgt.py by replacing manual validation checks in update_tenant with the newly introduced _auth_utils.validate_tenant_id helper function.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread firebase_admin/tenant_mgt.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macastelaz
fix(auth): simplify tenant and provider ID validation checks
cc05e76
@macastelaz
macastelaz requested a review from lahirumaramba October 20, 2026 19:44
@lahirumaramba lahirumaramba added the release-note label Oct 21, 2026
lahirumaramba
lahirumaramba approved these changes Oct 21, 2026
View reviewed changes

@lahirumaramba lahirumaramba left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM! Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lahirumaramba lahirumaramba added the release:stage Stage a release candidate label Oct 21, 2026
@macastelaz
macastelaz merged commit ae0a284 into main Oct 21, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@macastelaz
macastelaz deleted the fix-tenant-provider-id-validation branch October 22, 2026 21:05
morganchen12 pushed a commit that referenced this pull request Oct 30, 2026
@macastelaz @morganchen12
fix(auth): validate tenant and provider IDs and URL-encode query para…
e7081bb
…meters (#996)

* fix(auth): validate tenant and provider IDs and URL-encode query parameters

* fix(auth): simplify tenant and provider ID validation checks
@lahirumaramba lahirumaramba mentioned this pull request Nov 11, 2026
[chore] Release 7.8.0 #1005
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lahirumaramba lahirumaramba lahirumaramba approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

release:stage Stage a release candidate release-note

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@macastelaz @lahirumaramba
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.