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

com_api incorrectly returns 403 API Rate Limit Exceeded when rate limit has not yet been reached #127

Open
HumanPrinter opened this issue Jul 7, 2021 · 0 comments

Comments

@HumanPrinter
Copy link

I've installed the com_api component in my Joomla website and created a plugin to expose a public GET-endpoint.

I'm using the default settings which sets a rate limit of 60 requests per hour. During testing I discovered that I receive 403 (Request Limit Exceeded) errors even when I have not yet sent 60 requests in the past hour. After some investigation, I noticed that the error is returned when the log-table contains 60 entries (regardless of the timestamp in those entries).

I found the bug that is causing this and created a pull request to correct this bug (#126)

Used versions and environments:
Joomla version: 3.9.28
com_api version: 2.5.1
PHP version: 7.4.21

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

1 participant