refactor: rework scheme validation in oauth controller and frontend#1026
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDomain validation now distinguishes scheme, port, and hostname mismatches while changing URL and hostname normalization. OAuth redirect checks, ACL logging, frontend trust checks, tests, and package documentation were updated. ChangesDomain validation and redirect safety
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/validators/domain_validator_test.go`:
- Around line 226-229: Update the “Valid domains with non matching ports should
fail” test case to provide an errorFunc that asserts ErrPortMismatch, so the
expected port mismatch is explicitly validated instead of requiring no error.
Keep the existing DomainValidatorOptions, expected, and actual values unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ec9fb3cd-d642-4d77-9b06-86048335d36e
📒 Files selected for processing (7)
frontend/src/lib/hooks/redirect-uri.tsinternal/controller/oauth_controller.gointernal/controller/oauth_controller_test.gointernal/service/access_controls_service.gopkg/README.mdpkg/validators/domain_validator.gopkg/validators/domain_validator_test.go
💤 Files with no reviewable changes (1)
- internal/controller/oauth_controller_test.go
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit
pkgdirectory, including best-effort compatibility expectations and version-pinning recommendations.