-
Notifications
You must be signed in to change notification settings - Fork 337
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
Provide the ability to reset Fail2Ban count and ban flag #128
Conversation
ab40680
to
ec0ab57
Compare
@ktheory Thoughts? |
epoch_time = Time.now.to_i | ||
# Add 1 to expires_in to avoid timing error: http://git.io/i1PHXA | ||
expires_in = period - (epoch_time % period) + 1 | ||
key = "#{(epoch_time / period).to_i}:#{unprefixed_key}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stanhu this nearly a dupe of lines 18-21. What do you think about extracting it to a private method?
@stanhu: thanks for the nudge. 😄 This feature looks useful & I'd like to merge it in. Could you please add some tests for the |
4005f99
to
427c414
Compare
@ktheory: Thanks, done. |
bcb26b3
to
615a93f
Compare
615a93f
to
91947b8
Compare
@stanhu Awesome! Thanks so much. I aim to release version |
Provide the ability to reset Fail2Ban count and ban flag
@stanhu Just pushed v4.3.0. Thanks for all your improvements recently. You're this release's MVP. 😄 |
@ktheory Thank you for being so responsive and creating/maintaining Rack Attack! I'm very happy I can remove the monkey patches now. :) |
Remove Rack Attack monkey patches and bump to version 4.3.0 I finally got these monkey patches into Rack Attack v4.3.0, so GitLab no longer needs them. Hooray! See: rack/rack-attack#128 See merge request !693
This code is in production as a monkey-patch in GitLab v7.10, and I thought it would be helpful for others.
Closes #113