Skip to content

claude/fix-telegram-access-control#894

Open
noahzweben wants to merge 1 commit intomainfrom
claude/fix-telegram-access-control
Open

claude/fix-telegram-access-control#894
noahzweben wants to merge 1 commit intomainfrom
claude/fix-telegram-access-control

Conversation

@noahzweben
Copy link
Copy Markdown
Collaborator

The bot command handlers bypassed access control — they responded to
any DM user regardless of dmPolicy, leaking bot presence and
contradicting ACCESS.md's "Drop silently. No reply." contract for
allowlist mode.

Add dmCommandGate() that applies the same disabled/allowlist checks
as gate() without the pairing side effects, and route all three
handlers through it. Also prune expired pending codes before /status
iterates them.

Fixes #854

The bot command handlers bypassed access control — they responded to
any DM user regardless of dmPolicy, leaking bot presence and
contradicting ACCESS.md's "Drop silently. No reply." contract for
allowlist mode.

Add dmCommandGate() that applies the same disabled/allowlist checks
as gate() without the pairing side effects, and route all three
handlers through it. Also prune expired pending codes before /status
iterates them.

Fixes #854
@noahzweben noahzweben requested a review from k6l3 March 22, 2026 08:10
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.

Telegram plugin: /start, /help, /status commands bypass allowlist policy

2 participants