Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Our client has a requirement to blacklist the 10,000 most commonly used passwords, but unfortunately the password_policy schema was not equipped to deal with that amount of data.
The nice, easy solution is to change the config field in the database so it is "big". (How on earth do you say that and still make sense?)
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
#3 | password_policy-store_as_big-2662004-3.patch | 848 bytes | Sophie.SK |
|
Comments
Comment #2
Sophie.SKComment #3
Sophie.SKWhoops. Wrong patch file *sighs*
Comment #5
AohRveTPV CreditAttribution: AohRveTPV commentedThanks.
From looking at code, "big" for a text field translates to MySQL LONGTEXT, PostgreSQL text, and SQLite TEXT. The latter two are essentially unlimited length ("big" has no effect); the former is 4GiB. We could maybe get by with "medium", which translates to MySQL MEDIUMTEXT (16MiB), but the only upside (according to Stack Overflow) is saving one byte total of storage. And I suppose it is possible a blacklist would be greater than 16MiB. So "big" seems to make sense.