Skip to content

Commit 5c46797

Browse files
Merge pull request #20 from michaelvickersuk/make-passwordlist-check-case-insensitive
2 parents 5a294ad + c377449 commit 5c46797

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/DumbPasswordServiceProvider.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ public function boot()
4040
$path = realpath(__DIR__ . '/../resources/config/passwordlist.txt');
4141
$cache_key = md5_file($path);
4242
$data = Cache::rememberForever('dumbpwd_list_' . $cache_key, function () use ($path) {
43-
return collect(explode("\n", file_get_contents($path)));
43+
return collect(explode("\n", file_get_contents($path)))
44+
->map(function ($password) {
45+
return strtolower($password);
46+
});
4447
});
45-
return !$data->contains($value);
48+
return !$data->contains(strtolower($value));
4649
}, $this->message);
4750
}
4851

0 commit comments

Comments
 (0)