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

Consider limiting reactions as to avoid DOS/Abuse #71

Open
LordPraslea opened this issue Jan 13, 2025 · 2 comments
Open

Consider limiting reactions as to avoid DOS/Abuse #71

LordPraslea opened this issue Jan 13, 2025 · 2 comments

Comments

@LordPraslea
Copy link

Hi

While testing reactions locally i noticed I could add tens if not hundreds of reactions and there seems to be no limit to them.

Is this the intended usage? I'd imagine a BOT spamming the DB with thousands of reactions

I was thinking of a limiter per IP (or hashed IP to avoid GDPR) to allow one of each per 24 hours.

What do you think?

I'll probably need to have a look at other systems to see how well it behaves.

Out of curiosity haven't you noticed bots trying to cling to various API's on your website?

@jlelse
Copy link
Owner

jlelse commented Jan 15, 2025

Yeah I noticed this as well, I have posts with almost a million reactions, probably due to someone trying to reach non-existing limits. But I tried to keep the code for this feature as performant as possible and never noticed any impact due to it. I guess the best way to set a rate limit would be to use some reverse proxy like Caddy and configure a rate limit there.

@LordPraslea
Copy link
Author

Ok, nice. A "limit" might be usefull in some cases as to give the reactions some value, otherwise a single person can give 100 reactions and you wouldn't know if it where genuinely 100 people or 1 person who did it:). Yeah I guess caddy can rate limit, but this could also happen locally.

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

No branches or pull requests

2 participants