Skip to content

NaN rate-limit env silently disables limiting #7

Description

@royalpinto007

Problem

RATE_LIMIT_MAX=abc parses to NaN, and the limiter returns remaining: null without ever blocking: rate limiting silently disabled by a typo.

Where

lib/ratelimit.ts (Number(process.env.RATE_LIMIT_MAX || 20), no finite check).

Acceptance

Add a failing test first with RATE_LIMIT_MAX=abc, expecting fallback to defaults instead of allow-forever. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions