[freeRetries] strange behavior
See original GitHub issueIssue Description
Hello,
thanks for that great module!
However I am facing a strange behavior regarding the number of freeRetries
.
Indeed my snippet of code is the following:
options = { freeRetries: 10,
minWait: 25*60*60*1000,
maxWait: 25*60*60*1000,
proxyDepth: 1,
failCallback: function(req, res, next, nextValidRequestDate) {
res.status(429).send('You have made too many failed attempts in a short period of time, please try again ' + moment(nextValidRequestDate).fromNow());
}},
bruteforce = new ExpressBrute(bruteRedisStore, options);
In that case what happen:
After only 5 requests (whatever the time between each) I got:
You have made too many failed attempts in a short period of time, please try again in a few seconds
A retry passed few second still does not reset
the “counter”.
I was expecting to reach 10 -> banned -> retry after ~10 sec -> OK -> retry fail etc… with gradually increasing waiting time.
I might not have understood exactly the behavior of the module I think. If you got some time to explain me what is wrong in my thinking I would be very thankful!
Cheers!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Strange Behavior - The Criterion Channel
A cult classic filmed in New Zealand and infused with offbeat atmosphere, STRANGE BEHAVIOR (a.k.a. DEAD KIDS) anticipates the charm and menace of...
Read more >MON51: Strange Behavior of Program Code - Arm Developer
When I start debugging with MON51, I can view the Memory window and see that C:0x36-C:0x3D actually contains the values 0x31-0x38 (which is...
Read more >Behavior - unusual or strange - UF Health
Psychiatric illnesses that are often associated with unusual or strange behavior include: Anxiety disorder; Bipolar disorder · Depression ...
Read more >Just failed 300-115 because of a SIM problem
Personally, I have a big issue with that these sims DO NOT behave like real equipment. It's very easy to do things in...
Read more >r/AIDungeon - Thank you for ruining the game and making it ...
You get 100 actions(with 2 free retries) every 8 hours. ... would rather not get to play, than provide monetary reward for awful...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The correct behavior for that config is: reach 10 -> banned -> retry after ~10 seconds -> fail -> retry after 25 hours -> OK.
As for why it’s failing after 5, can you include a snippet of how you’re using the middleware, it almost sounds like it’s being included twice.
I am not a security expert but I don’t think
express-brute
should change anything. May be this issue can be closed. Thanks for your time!