-
Notifications
You must be signed in to change notification settings - Fork 5
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
illogical pttl value leads to functional blacklisting #34
Comments
After deleting the key, everything was functioning correctly. I don't know how to reproduce the setting, however, it did happen without any special manipulation on my part. |
@weisjohn @niftylettuce it looks like if you have multiple connections at once we could have a race condition the results in -1. What they're talking about in this pull request. tj/node-ratelimiter#25 Maybe on the next request if the ttl is -1 we can delete the key. |
Nevermind what I said its not multiple connections, I've reproduced it. If the ttl is very short say 1ms left or something. |
@niftylettuce opened #35 let me know if you have any thoughts here |
Just wanted to follow up here - it's because we were using |
I'm still trying to track down how this happened, but on my local redis (3.0.2) I see:
And according to http://redis.io/commands/pttl,
Should we check for -1 as well as null in https://github.com/scttcper/koa-simple-ratelimit/blob/master/index.js#L79 ?
As it is now, it can never get unset and the user (me) is hosed.
The text was updated successfully, but these errors were encountered: