Skip to content

Commit 2e5dc05

Browse files
committed
Use password_get_info
1 parent ea8798f commit 2e5dc05

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Console/HashCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Laravel\Passport\Console;
44

55
use Illuminate\Console\Command;
6-
use Illuminate\Support\Str;
76
use Laravel\Passport\Passport;
87

98
class HashCommand extends Command
@@ -39,7 +38,7 @@ public function handle()
3938
$model = Passport::clientModel();
4039

4140
foreach ((new $model)->whereNotNull('secret')->cursor() as $client) {
42-
if (Str::startsWith($client->secret, '$2y')) {
41+
if (password_get_info($client->secret)['algo'] === PASSWORD_BCRYPT) {
4342
continue;
4443
}
4544

0 commit comments

Comments
 (0)