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

rate-limit submissions #1736

Merged
merged 6 commits into from
Jan 14, 2024
Merged

rate-limit submissions #1736

merged 6 commits into from
Jan 14, 2024

Conversation

vadosnaprimer
Copy link
Collaborator

@vadosnaprimer vadosnaprimer commented Jan 5, 2024

When you attempt to submit by going from sub list page to SubmitMovie, I replace the entire page with the notice telling how much you need to wait, if you're beyond the limit. The limit is configured in appsettings.

I doubt it's done properly, but should be fixable.

fix #1709

@Masterjun3
Copy link
Collaborator

This seems to be only a soft limit, a client limit, right? So for example someone opening 20 tabs of the submission page could still submit them all one after another?

@vadosnaprimer
Copy link
Collaborator Author

Woops...

decide if allowed to submit by count of those
…ubmit

probably needs to tell them it didn't go through?
stop hardcoding notice lines
_earliestTimestamp.AddDays(_settings.SubmissionRate.Days)
};

public bool SubmissionAllowed(int userId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be async

@adelikat adelikat merged commit cf63d59 into main Jan 14, 2024
1 check passed
@adelikat adelikat deleted the submission-rate-limit branch January 14, 2024 18:26
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.

Implement system for rate-limiting submissions
3 participants