Skip to content

Validate OAuth registration client names#177

Merged
pushpak1300 merged 5 commits into
laravel:mainfrom
Gujiassh:fix/oauth-client-name-validation
Mar 19, 2026
Merged

Validate OAuth registration client names#177
pushpak1300 merged 5 commits into
laravel:mainfrom
Gujiassh:fix/oauth-client-name-validation

Conversation

@Gujiassh
Copy link
Copy Markdown
Contributor

Summary

  • require a non-empty OAuth client name during registration while preserving the legacy name fallback when client_name is absent
  • normalize the controller to pass a validated client name into Passport instead of forwarding raw request input
  • add focused registration tests covering the missing-name validation, legacy fallback, and client_name precedence

Validation

  • vendor/bin/pest tests/Unit/Server/RegistrarTest.php --filter='requires an oauth client name|falls back to the legacy name field|prefers client_name over name'
  • vendor/bin/pest tests/Unit/Server/RegistrarTest.php
  • vendor/bin/pint --test src/Server/Http/Controllers/OAuthRegisterController.php tests/Unit/Server/RegistrarTest.php

Notes

  • composer test:lint still fails locally because of a pre-existing src/Facades/Mcp.php Pint issue unrelated to this diff.
  • composer test:unit still needs a coverage driver in this environment, so the focused Pest runs above were used for local verification.

Gujiassh and others added 3 commits March 19, 2026 14:22
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@pushpak1300 pushpak1300 self-requested a review March 19, 2026 06:27
@pushpak1300 pushpak1300 merged commit 56cf8e7 into laravel:main Mar 19, 2026
21 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.

2 participants