Skip to content

feat(security): add input validation for HTTP_RATE_LIMITS (reject zero/negative values) #2570

Description

@coderabbitai

Summary

The HTTP_RATE_LIMITS configuration (used for non-login HTTP rate limiters) currently does not validate that the configured windowMs and max values are positive integers. Zero or negative values could silently produce broken or permissive rate-limiting behavior.

Proposed improvement

Add input validation when consuming HTTP_RATE_LIMITS entries to reject (or warn on) zero/negative values for windowMs and max.

Context

Identified during review of PR #2568 (#2568) as a valid improvement on pre-existing code outside the scope of that security fix.

Requested by @dirkwa.

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