Skip to content

Public follow-list endpoints accept invalid pagination ranges #287

@sevencat2004

Description

@sevencat2004

The public user follow-list endpoints parse pagination params without guarding non-positive limits or negative offsets.\n\nAffected routes:\n- GET /api/users/[username]/followers\n- GET /api/users/[username]/following\n\nExamples:\n- limit=0 or a negative limit can produce an invalid Supabase range where the end index is before the start index.\n- offset=-10 is passed directly to .range(), producing a negative start index.\n\nBoth endpoints should fall back to a positive default limit, preserve the existing max limit, and clamp negative offsets to 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions