Skip to content

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

@HumanPrinter

Description

@HumanPrinter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions