Intelligence, Advanced Charting & Trading Platform
security(outbox): require consumed one-send permit before any positive egress authorization
davoodmehraban89 committed
Oct 23, 2026 at 10:53 UTC
b8bfaa87964ca10a4b550b355f48ed4328c7a87d
1 file changed
+2
db/migrations/0006_alert_runtime_atomic.sql
+2
@@ -365,6 +365,8 @@ BEGIN
365
WHERE o.id = p_outbox_id AND o.lease_token = p_claim_token
366
AND o.recipient_ref = p_recipient_ref AND o.channel = p_channel
367
AND o.status = 'LEASED'
368
+ AND o.send_started_at IS NOT NULL
369
+ AND o.send_started_at <= p_at
370
AND o.leased_at <= p_at AND o.lease_until > p_at
371
AND c.consented_at <= p_at AND c.revoked_at IS NULL
372
FOR SHARE OF c;