getRecipients adds the conversation contact to CC when replying to a third party

オープン
#69 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue:1263 の getRecipients を追跡し、第三者に返信する際に関係する受信者ブランチを調査してください。意図された動作を #67、#68、chatwoot/chatwoot#15581 と比較してください。完了の条件は、返信対象のメッセージの受信者であった場合を除き、会話の連絡先が CC に追加されないこと、および関連する CC の処理にリグレッションがないことです。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

When an email conversation contains a message from someone other than the conversation contact, getRecipients adds the conversation contact to the CC list. Replying to that third party therefore copies the original contact in, without the agent choosing it and without an obvious signal.

Call site, unchanged between v4.13.0 and v4.17.1:

// chatwoot/chatwoot, app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue:1263
const { cc, bcc, to } = getRecipients(
  this.lastEmail,
  conversationContact,
  inboxEmail,
  forwardToEmail
);
To reproduce
  1. An email conversation exists with contact A.
  2. An inbound message arrives on the same thread from B, a different address — a supplier, contractor or colleague who has joined the chain.
  3. The agent replies to B's message.
  4. Observe A pre-populated in CC.
Expected behaviour

Recipients for a reply should derive from the message being replied to. The conversation contact should not be added automatically when they were not a party to that message. If the current behaviour is deliberate for some flows, it would be safer as an explicit action the agent takes rather than a default.

Impact

Confidentiality. The realistic case is a contractor or supplier discussing trade pricing or a referral arrangement on a thread the end customer also started. The customer receives a copy. No agent action causes it and nothing draws attention to it, so it can recur for a long time before anyone notices.

We treat this as the highest-severity issue we have found in our deployment.

Related — worth reading before triaging

There is active work in this exact function, and it is the inverse of this bug:

  • #67 / #68 here — getRecipients drops incoming To-line recipients from the reply CC.
  • chatwoot/chatwoot#15581 — the downstream half of that fix.

Those are about recipients wrongly falling out of CC. This report is about a recipient wrongly being put into CC. They touch the same branch, so it is probably worth settling the intended rule for that branch once rather than twice — a fix for one could easily mask or worsen the other.

Environment

Self-hosted Chatwoot v4.13.0, Docker. Behaviour re-checked against the v4.17.1 tag.

Offer

We have run a server-side mitigation in production since 26 August. Happy to work up a PR here, and happy to coordinate with whoever is on #68 so the two do not collide.

主要言語
TypeScript
スター
11
フォーク
14
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

chatwoot/utils のほかの issue

chatwoot/utils の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。