Skip to content

Commit

Permalink
Merge pull request #1222 from pkostic/8.x
Browse files Browse the repository at this point in the history
Fix 500 Internal Server Error response on validating recently deleted client
  • Loading branch information
taylorotwell authored Apr 21, 2020
2 parents 02e2d83 + 010b807 commit 31d5dfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Http/Middleware/CheckClientCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CheckClientCredentials extends CheckCredentials
*/
protected function validateCredentials($token)
{
if (! $token || $token->client->firstParty()) {
if (! $token || ! $token->client || $token->client->firstParty()) {
throw new AuthenticationException;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/CheckClientCredentialsForAnyScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CheckClientCredentialsForAnyScope extends CheckCredentials
*/
protected function validateCredentials($token)
{
if (! $token || $token->client->firstParty()) {
if (! $token || ! $token->client || $token->client->firstParty()) {
throw new AuthenticationException;
}
}
Expand Down

0 comments on commit 31d5dfc

Please sign in to comment.