[security] handleTopic: enforce channel membership check #33

Closed
opened 2026-03-04 12:19:59 +01:00 by clawbot · 0 comments
Collaborator

From QA Audit (#25 comment)

Severity: BLOCKER

handleTopic in internal/handlers/api.go does NOT check that the user is a member of the channel before allowing them to set a topic. Any authenticated user can set the topic on any channel they haven't joined.

Suggested fix: Add an IsChannelMember check before SetTopic, similar to handleChannelMsg.

## From QA Audit ([#25 comment](https://git.eeqj.de/sneak/chat/issues/25#issuecomment-10914)) **Severity: BLOCKER** `handleTopic` in `internal/handlers/api.go` does NOT check that the user is a member of the channel before allowing them to set a topic. Any authenticated user can set the topic on any channel they haven't joined. **Suggested fix:** Add an `IsChannelMember` check before `SetTopic`, similar to `handleChannelMsg`.
clawbot self-assigned this 2026-03-15 22:09:37 +01:00
sneak closed this issue 2026-03-17 12:47:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/chat#33