Skip to content

fix(oidc): save providers with an empty dynamic redirect URI - #265

Merged
cxymds merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/oidc-null-redirect
Oct 15, 2026
Merged

cxymds merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/oidc-null-redirect

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Description

OIDC providers using dynamic redirects can return redirect_uri: null. Normalize this value to an empty form field so edits can be saved after each configuration reload. Handle validation exceptions through the save error handler so failures display feedback and restore the saving state.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed

Seven regression tests mount the OIDC page and exercise saving, reloading, static redirect validation, validation/payload exceptions, and API failures. Five tests fail against the original code; all seven pass with this change. The full suite passes all 702 tests on Node 22.

corepack pnpm install --frozen-lockfile
corepack pnpm type-check
corepack pnpm lint
corepack pnpm format:check
corepack pnpm test:run
git diff --check

Browser validation used the actual Console page with a mocked API. The original page throws null.trim before sending a PUT. The fixed page completes PUT + GET and a second save after the API returns null again. Static redirect validation, API failure feedback with preserved input, and saving at a 390px mobile viewport also pass.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Refs rustfs/rustfs#8489.

Screenshots (if applicable)

Desktop and mobile captures use the actual Console page with mocked API responses.

Before saving After saving
Save fails with null redirect URI Save succeeds and reloads the provider
Mobile save Successful save on a 390px mobile viewport

Additional Notes

Configuration changes take effect after a RustFS restart. Rollback: revert this commit.

@GatewayJ
GatewayJ requested a balanced review from Copilot October 13, 2026 03:47

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@GatewayJ
GatewayJ requested review from cxymds and overtrue October 15, 2026 08:42
@cxymds
cxymds merged commit 6e2cca0 into rustfs:main Oct 15, 2026
10 checks passed
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.

3 participants