-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Lua script takes non integer argument as input which causes random error on user supplied input #221
Comments
@shameersheik Hi, this is interesting. Could you help to reproduce this error or provide a code snippet? Could you also provide |
Yep. Way to reproduce.
rate-limiter-flexible version : "^2.3.4"
|
@animir Sorry Forgot to tag. |
Hi any update on this ? |
@shameersheik Hi, I looked into your issue. In your case, you may round that number of points before points are consumed. Or, as mentioned before, you can increase the number of points in the limiter and consume 333 from 1000. I hope this helps. When I or somebody from the community have time to work on your issue, we'll do that. You can also contribute and add that additional check to Note, I also edited some docs on wiki and added |
Thank you will take a look at this. |
The argument 1 used in the INCRBY statement in the Lua script can be anything and not necessarily an integer.
node-rate-limiter-flexible/lib/RateLimiterRedis.js
Line 5 in d4e26c0
This will cause "“ERR value is not an integer or out of range script: , on @user_script:1. ”
The problems :
Solution :
node-rate-limiter-flexible/lib/RateLimiterRedis.js
Line 80 in d4e26c0
The text was updated successfully, but these errors were encountered: