mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
findConnectionByPublicRef and connectionRelaySecretResolver loaded every
tool_connections row into memory and filtered the relay publicRef in JS. Both
run on the inbound webhook path before signature verification, so the scan was
a pre-auth DoS vector that worsens as connections grow. Replace with a
GIN-indexed `config @> {relay:{publicRef}}` containment lookup limited to one
row, and add the supporting index in migration 0183.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Paperclip <noreply@paperclip.ing>