0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/plugins/chat
Joffrey JAFFEUX 71f57d1d9a SECURITY: Harden chat DM channel creation and expansion [backport 2026.1]
Backport of #473 to release/2026.1.

---

Two issues fixed:

1. **Group visibility bypass** — the `target_groups` parameter was passed directly to the user resolution query without checking group or member visibility for the acting user. An authenticated chat user could craft an API request with a known private/hidden group name and receive a channel containing that group's members, leaking their identities. Fix: filter `target_groups` through `visible_groups` and `members_visible_groups` scopes before resolving users in both `CreateDirectMessageChannel` and `AddUsersToChannel` services.

2. **Chat-disabled user bypass** — `can_chat?` only checked group membership, not the `chat_enabled` user preference. A chat-disabled user could create or query DM channels between other users via the direct messages API, potentially exposing private `last_message` content. Fix: add `chat_enabled` check to `can_chat?` and add an actor inclusion guard in `fetch_target_users` so the service fails if the acting user gets filtered out of the resolved user set.

---

**Security Advisory:** https://github.com/discourse/discourse/security/advisories/GHSA-2m5j-6v2r-cq2h
2026-03-31 15:12:50 +01:00
..
admin/assets/javascripts UX: add admin sidebar icons for preinstalled plugins (#36764) 2025-12-18 16:39:00 -05:00
app SECURITY: Harden chat DM channel creation and expansion [backport 2026.1] 2026-03-31 15:12:50 +01:00
assets FIX: dynamic highlighting of self mentions (#37321) 2026-01-28 14:59:48 +04:00
config I18N: Update translations (#37916) 2026-02-25 09:47:58 -05:00
db DEV: remove chat channel icon upload id (#36693) 2025-12-16 16:00:56 +04:00
lib DEV: remove chat channel icon (#36690) 2025-12-16 09:37:08 +04:00
public
spec SECURITY: Harden chat DM channel creation and expansion [backport 2026.1] 2026-03-31 15:12:50 +01:00
test/javascripts UX: Prioritize chat search results by relevance (#36959) 2026-01-06 08:57:08 +01:00
about.json DEV: Only load specific plugin bundles during qunit test (#33678) 2025-07-21 21:00:48 +01:00
package.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00
plugin.rb DEV: Remove obsolete feature checks (#36175) 2025-11-23 20:57:46 +01:00
README.md
tsconfig.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.