Skip to content

fix(social): label face-room human lines from the server-stamped sender, not the client's who - #151

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/face-human-who-trusted-dae8
Oct 16, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
Birfy:cursor/face-human-who-trusted-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

The face-to-face human message line carried a who filled in by the sending client, so a peer could pretend to be another room member (Codex P1s on #118).

Bot Social already stamps the authenticated sender (handle, display_name, owner_name, label) on every room.message, so this is client-only: the line is labelled from that stamped from and the envelope who is ignored. If from is missing, it falls back to the handle's home name, then "Someone", never a claimed other member. Spoof tests cover a message claiming one member in JSON while from names another.

No server change and no deploy needed.

Bot Social already puts an authenticated `from` snapshot on every
face-room message. The FLYBOT-FACE-HUMAN `who` is client JSON inside
untrusted text, so a peer could impersonate another member. Display
the `from` label (or that handle's home) and ignore the claimed name.

No Bot Social server change. Do not deploy.

Co-authored-by: Danyang Chen <birfychen@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 910d8e6b3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +230 to +231
const label = cleanFaceName(from.label, '')
if (label) return label

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the home fallback through event normalization

When a legacy room.message has an authenticated from.handle but omits profile fields, renderFaceEvent() first passes from through viewFaceMember(), which always synthesizes a label (for @writer.alice.home, it produces Writer). This early return therefore prevents the handle branch from selecting Alice, so these messages are mislabeled despite the intended home-label fallback; the new test misses this by calling trustedFaceWho() directly on the raw object. Preserve whether the label was server-supplied or derive the home segment before normalization.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:42:43.054247Z 910d8e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Birfy
Birfy added this pull request to the merge queue Oct 16, 2026
Merged via the queue into ThinkFlowLab:main with commit 2c0b1e3 Oct 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants