Skip to content

fix(api): validate numeric cursors and fix double-prefixed cache keys#1503

Merged
andrewklau merged 1 commit into
mainfrom
fix/api-cursor-validation-cache-prefix
Jun 12, 2026
Merged

fix(api): validate numeric cursors and fix double-prefixed cache keys#1503
andrewklau merged 1 commit into
mainfrom
fix/api-cursor-validation-cache-prefix

Conversation

@andrewklau

Copy link
Copy Markdown
Contributor

No description provided.

- cursor params compared against bigint/numeric columns (account txns,
  receipts, stake txns, blocks, txns, chain-abstraction) accepted any
  string; a transaction hash passed as cursor reached Postgres and threw
  'invalid input syntax for type bigint'. Validate digits-only at the
  schema boundary so clients get a 422 instead.
- nb-redis cache() prefixed the key and then passed it to get/set, which
  prefix again — every cache entry was stored double-prefixed
  (prefix:prefix:key). Pass the raw key; stale double-prefixed entries
  age out via their TTLs.
@andrewklau andrewklau merged commit 63c51d3 into main Jun 12, 2026
1 check failed
@andrewklau andrewklau deleted the fix/api-cursor-validation-cache-prefix branch June 12, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant