Skip to content

search() accepts negative/huge limit and prefetch_limit with no guard #10

Description

@royalpinto007

Problem

search() accepts limit=-1 or limit=10_000 (and any prefetch_limit) with no guard before they reach query_points.

Where

src/tenantq/search.py (search: limit: int = 10, prefetch_limit: int = 50, passed straight into the query).

Acceptance

Add a failing test first calling search(..., limit=-1) and limit=10_000, expecting ValueError or clamping to a documented bound. 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