-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Add rate limiter #1976
Merged
Merged
feat: Add rate limiter #1976
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6e4e99e
Add rate limiter
bolkedebruin 82b5809
Lint
bolkedebruin 7a1ef04
sigh conflicting linters
bolkedebruin 418ff08
further linting
bolkedebruin c357412
Address comments
bolkedebruin 537a7e8
ParamSpec is only available > 3.8
bolkedebruin 55998b8
Use latest flask-limiter
bolkedebruin f170dd4
black
bolkedebruin 2952544
old style flake8
bolkedebruin ea19c87
Fix timeline when inserting
bolkedebruin 2fe7f08
Merge branch 'master' into master
dpgaspar 5228392
Merge branch 'master' into master
dpgaspar 7723ff1
Merge branch 'master' into master
dpgaspar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This seems a bit agressive, what do you think about keeping the same rate but increasing the number of attempts needed. Example: "10 per 25 second"?
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.
I don't think it's aggressive. A human being will have trouble meeting this if they have to retype the password and otherwise a short pause won't hurt. An automated system configured wrongly will remain wrong.
So if you realize "omg ive typed in the password/username twice" you probably start thinking a bit longer and cross the 5s barrier (try it!) and if you do make it a slight pause won't hurt IMHO.
An alternative is to redirect to a captcha when reaching the limit but I'll leave that to someone else.
Anyways I'm not married to this limit but I do not think it's too aggressive.
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.
I was able to reach it pretty easily and manually
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.
Easily as in normal human behavior or as in trying to trigger it? Triple entry isn't common.
But if you think it's better we can switch.
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.
Trying to trigger it, but If you agree, I think it would be more conservative and still safe against brute force and DoS