Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Max 'n' changes per 'time' #4

Open
whnr opened this issue Dec 20, 2014 · 1 comment
Open

Feature: Max 'n' changes per 'time' #4

whnr opened this issue Dec 20, 2014 · 1 comment

Comments

@whnr
Copy link

whnr commented Dec 20, 2014

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.

@markuman
Copy link

markuman commented Nov 21, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants