mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-30 07:33:59 +08:00
Closes #26 All list RPCs (ListSandboxes, ListProviders, ListSandboxPolicies, ListInferenceRoutes) passed the client-provided limit directly to SQL queries with no upper bound. A client could send limit=u32::MAX and cause the server to load all records into memory, risking OOM. This introduces a MAX_PAGE_SIZE constant (1000) and a clamp_limit helper that caps the limit in every list handler before it reaches the persistence layer. Co-authored-by: John Myers <johntmyers@users.noreply.github.com>