ulsdevteam / pkp-betterPassword

Plugin to implement password requirements for PKP OJS/OMP
GNU General Public License v2.0
7 stars 6 forks source link

Monitor updates in the Site::setMinPasswordLength #18

Open jonasraoni opened 3 years ago

jonasraoni commented 3 years ago

Since the cache is discarding smaller passwords, we need to monitor changes in this setting (or inflate the cache with small passwords), that could happen outside the plugin.

Still talking about the cache... If we sort the hashes before storing them into the disk, we could use a binary-search instead of using the opcache. But I think it's not worth, unless the file is huge :D

ctgraham commented 3 years ago

I think the cache should be dependent on the Site's minPasswordLength setting. If the setting changes, the cache is invalid and needs to be recreated.

jonasraoni commented 3 years ago

Yep, I've added a local check here, but I think it should be done through a hook.