Skip to content

Conversation

@goulvenclech
Copy link
Contributor

@goulvenclech goulvenclech commented Nov 16, 2025

Fix #49 . OAuth clients can now use ** wildcard in redirect_uris for unlimited-length URL path segments (e.g., https://example.com/property/**), while the existing * wildcard continues to work for DNS subdomains with 3-63 character limit. This is fully backwards compatible and requires no migration.

I haven’t been able to properly run all tests/ Elixir formatter/ Credo, because I don’t have Elixir 1.11 installed and it was causing far too many changes with 1.19. I’ll see if my changes pass CI and, if not, I’ll stop being lazy and reinstall ASDF with Elixir 1.11.

What has changed?

  • lib/boruta/oauth/schemas/client.ex: added replace_wildcards/1 private function to support both * (DNS-safe, 3-63 chars) and ** (RFC 3986 path segments, unlimited length) wildcard patterns in redirect URI matching.

How is this tested?

  • test/boruta/oauth/schemas/client_test.exs: added comprehensive unit tests covering single wildcard (*), double wildcard (**), mixed patterns, and some edge cases.
  • test/boruta/oauth/integration/authorization_code_grant_test.exs & test/boruta/oauth/integration/implicit_grant_test.exs & test/boruta/oauth/integration/hybrid_test.exs: added integration tests with ** wildcard for long path slugs (80+ characters).

Copy link
Collaborator

@patatoid patatoid left a comment

Choose a reason for hiding this comment

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

Looking great! Thank you for the contribution.

@patatoid patatoid merged commit b10a666 into malach-it:master Nov 17, 2025
1 of 2 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.

OAuth2 Wildcard Character Limit Issue

2 participants