Skip to content

Commit 81aaa78

Browse files
authored
Merge pull request #392 from TimWolla/security-client-revoke
Fix ClientRepository::revoked() for deleted clients
2 parents f047e3a + cdc07b2 commit 81aaa78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ClientRepository.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ public function regenerateSecret(Client $client)
174174
*/
175175
public function revoked($id)
176176
{
177-
return Client::where('id', $id)
178-
->where('revoked', true)->exists();
177+
$client = Client::find($id);
178+
179+
return is_null($client) || $client->revoked;
179180
}
180181

181182
/**

0 commit comments

Comments
 (0)