diff --git a/src/DumbPasswordServiceProvider.php b/src/DumbPasswordServiceProvider.php index b5cb6da..719e926 100644 --- a/src/DumbPasswordServiceProvider.php +++ b/src/DumbPasswordServiceProvider.php @@ -40,9 +40,12 @@ public function boot() $path = realpath(__DIR__ . '/../resources/config/passwordlist.txt'); $cache_key = md5_file($path); $data = Cache::rememberForever('dumbpwd_list_' . $cache_key, function () use ($path) { - return collect(explode("\n", file_get_contents($path))); + return collect(explode("\n", file_get_contents($path))) + ->map(function ($password) { + return strtolower($password); + }); }); - return !$data->contains($value); + return !$data->contains(strtolower($value)); }, $this->message); }