fix(nostr): enforce inbound dm policy before decrypt

This commit is contained in:
Peter Steinberger
2026-03-22 09:36:07 -07:00
parent a94ec3b79b
commit 1ee9611079
9 changed files with 748 additions and 28 deletions

View File

@@ -130,6 +130,12 @@ Notes:
- **open**: public inbound DMs (requires `allowFrom: ["*"]`).
- **disabled**: ignore inbound DMs.
Enforcement notes:
- Sender policy is checked before signature verification and NIP-04 decryption.
- Pairing replies are sent without processing the original DM body.
- Inbound DMs are rate-limited and oversized payloads are dropped before decrypt.
### Allowlist example
```json5
@@ -234,6 +240,7 @@ docker run -p 7777:7777 ghcr.io/hoytech/strfry
- Never commit private keys.
- Use environment variables for keys.
- Consider `allowlist` for production bots.
- Pairing and allowlist policy is enforced before decrypt, so unknown senders cannot force full crypto work.
## Limitations (MVP)

View File

@@ -36,7 +36,7 @@ openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
```
Supported channels: `telegram`, `whatsapp`, `signal`, `imessage`, `discord`, `slack`, `feishu`.
Supported channels: `telegram`, `whatsapp`, `signal`, `imessage`, `discord`, `slack`, `feishu`, `nostr`.
### Where the state lives