Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[freeRetries] strange behavior

See original GitHub issue


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!


Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

AdamPflugcommented, Feb 5, 2016

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.

AdrienFromToulousecommented, Feb 6, 2016

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found