mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
load password dictionary as array
This commit is contained in:
+4
-1
@@ -606,7 +606,10 @@ $register->set('geodb', function () {
|
||||
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2022-06.mmdb');
|
||||
});
|
||||
$register->set('passwordsDictionary', function () {
|
||||
return \file_get_contents(__DIR__ . '/assets/security/10k-common-passwords');
|
||||
$content = \file_get_contents(__DIR__ . '/assets/security/10k-common-passwords');
|
||||
$content = explode('\n', $content);
|
||||
$content = array_flip($content);
|
||||
return $content;
|
||||
});
|
||||
$register->set('db', function () {
|
||||
// This is usually for our workers or CLI commands scope
|
||||
|
||||
Reference in New Issue
Block a user