Skip to content
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

Add rate limiter for insertions and deletions #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Nov 12, 2024

Add options to rate limit insertion and deletions. Disabled by default.

@matze
Copy link
Owner

matze commented Dec 23, 2024

Can't we use this tower layer instead of pulling in yet another dependency?

@cgzones
Copy link
Contributor Author

cgzones commented Jan 7, 2025

Can't we use this tower layer instead of pulling in yet another dependency?

One could, but I tried to achieve something different: Such a layer will rate-limit all requests, including viewing existing pastes. This can also being achieved via a DDOS in a proxy webserver, used for TLS encryption (nginx/apache).
I tried to explicitly limit the addition and deletion of pastes to mitigate spamming and bruteforcing the deletion of a specific paste a bit.

Add options to rate limit insertion and deletions.
Disabled by default.
@matze
Copy link
Owner

matze commented Jan 12, 2025

I'll slate this and the other open PRs for the release after the next one. A lot of good and non-controversial stuff has piled up already and deserves to be properly released.

@matze
Copy link
Owner

matze commented Jan 14, 2025

I was thinking a bit about the usefulness. First of all: I hope no one is running this pastebin facing the internet and I don't think that we should add complexity that could be mitigated differently for internal networks. Second: isn't this penalizing everyone instead of the caller?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants