Skip to content

Conversation

@hafezdivandari
Copy link
Contributor

@hafezdivandari hafezdivandari commented Jun 30, 2024

This is a security enhancements. Determine if the client handles the specified grant before proceeding the request, otherwise respond with unauthorized_client error according to RFC6749 section 5.2.

@github-actions
Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@hafezdivandari hafezdivandari marked this pull request as ready for review February 20, 2025 01:33
@taylorotwell taylorotwell merged commit 089e2c3 into laravel:13.x Feb 20, 2025
4 checks passed
@hafezdivandari hafezdivandari deleted the 13.x-check-client-handles-grant branch February 20, 2025 21:48
protected function grantTypes(): Attribute
{
return Attribute::make(
get: fn (?string $value): array => isset($value) ? $this->fromJson($value) : array_keys(array_filter([

Choose a reason for hiding this comment

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

get: fn (?string $value): array => !empty($value) ? $this->fromJson($value) : array_keys(array_filter([

When table has data and grant_types column value is empty then isset check returns true and returns null which throws type error as method expects array to return.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean by empty grant_types? "[]" or "" or anything else?

var_dump($client->attributes['grant_types']);

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