Skip to content

Guard user search limit against malformed values #344

@Jorel97

Description

@Jorel97

The authenticated user mention search endpoint parses limit with parseInt, but malformed values such as limit=abc produce NaN. The current clamp uses Math.max/Math.min directly on that value, so NaN can flow into supabase.limit(...) instead of falling back to the documented default of 10.

Expected behavior: malformed or non-finite limits should use the default limit, while valid values remain clamped to 1..20.

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