0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/chat/spec/requests
Alan Guo Xiang Tan f4a9c63667
SECURITY: Enforce chat message length before cooking it (#41725)
Chat::CreateMessage and Chat::UpdateMessage cooked the full,
attacker-controlled message (markdown-it rendering in V8) before the
chat_maximum_message_length limit was enforced at save!. A single
low-privilege request with an oversized body could burn tens of seconds
of worker CPU on rendering that was immediately discarded as too long,
enabling denial of service against the shared worker pool.

Validate the message length in the service contract, which runs before
the message is cooked, so oversized input is rejected without the
expensive rendering. The model-level length validation remains as
defense in depth. The guard covers the create, edit, and
Slack-compatible incoming-webhook paths, which all route through these
services.
2026-07-16 11:10:06 +08:00
..
admin SECURITY: prevent moderators from exporting user Chat DMs 2026-02-26 12:22:54 +00:00
chat SECURITY: Enforce chat message length before cooking it (#41725) 2026-07-16 11:10:06 +08:00
core_ext DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
application_controller_spec.rb
chat_controller_spec.rb FEATURE: add new chat reactions popup (#41028) 2026-06-25 14:56:08 +04:00
direct_messages_controller_spec.rb DEV: Fix deprecations in plugins specs and silence output (#39257) 2026-04-15 00:00:46 +02:00
reviewables_controller_spec.rb SECURITY: Chat authorization and disclosure fixes 2026-05-19 00:26:04 +01:00