You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d00a01
Browse filesBrowse the repository at this point in the historyBrowse files
fix(api): reject malformed cursors with 400 instead of listing page one
decodeCursor returned null for an undecodable cursor and the callers treated
null as "no cursor", so GET /v1/templates, GET /v1/templates/pull and
GET /v1/email/logs answered 200 with the first page. A client following a
stale or corrupted cursor looped over page one with no error.
- decodeCursor (packages/db) now accepts only a value encodeCursor could
produce: the decoded date must re-encode to the input. This rejects
lookalikes such as "5|abc", which new Date() parses as a valid date.
- apps/api/src/lib/cursor.ts parseCursorParam: absent cursor is the first
page; a present but invalid cursor sets 400 and throws, which the standard
error handler reports as { error, code: "BAD_REQUEST" }.
- The three cursor-paginated routes use it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxJAQNUP4FKZHL1yzPDsGd
0 commit comments