open-webui/backend/open_webui/socket
Claude 72429ea8c0
fix(stream): message-in-chat check and don't stack resume requests
- Added message-in-chat binding check alongside the existing chat-
  ownership check. Both use the same already-fetched chat object, so
  this is still one DB round-trip. Defense-in-depth for the case
  where a client supplies one of its own chat_ids but a different
  chat's message_id — the user-scoped key would still serve the
  request otherwise.

- requestResumeForMessage now early-returns if a fence already
  exists for the same message. Fixes two operational concerns:
    * Mixed-version deployments where an older backend doesn't echo
      request_id: previously every reconnect reset the fence timer
      AND set a new request_id, so no reply could ever match; now
      the first fence runs to completion or timeout and only
      subsequent requests after that get a fresh chance.
    * Rapid reconnect churn: used to kick the timer forward
      indefinitely, now one fence per message lifecycle.
2026-04-15 07:53:35 +00:00
..
main.py fix(stream): message-in-chat check and don't stack resume requests 2026-04-15 07:53:35 +00:00
utils.py refac 2026-03-22 05:48:05 -05:00