mailpw_change icon indicating copy to clipboard operation
mailpw_change copied to clipboard

Feature: Max 'n' changes per 'time'

Open whnr opened this issue 10 years ago • 1 comments

Hi! Very nice script. Is it possible to add the feature you already proposed: Having a limit on sequential changes per time? That would increase the safety quite well.

whnr avatar Dec 20 '14 23:12 whnr

It would need a database where to save the number of tries. You can add it with a few lines of python code

E.g. use redis for that. the key is the virtual user. And with every access you perform a INCR <virtualuser> and a EXPIRE <virtualuser> 3600. So the key will be deleted after one hour (that's a reset and your 'per time' value). Then you have to check (if this than that) the number (GET <virtualuser>) before try to change. If the number is > 10 e.g., you don't forward the process.

markuman avatar Nov 21 '16 09:11 markuman