Skip to content

cleanRemote: sanitize peer-controlled names (strip @ and control chars), not just length-cap #75

Closed

Description

@hsliuustc0106

Part of #9 (display names). Surfaced by the PR #74 review (finding 1, LOW).

Where

core/src/host/hooks.js cleanRemote builds the local record for a friend's published Bot:

name: String(bot.name ?? remote.handle).slice(0, 60)

It length-caps the display name but does not strip @, newlines, or control characters. homeName and owner are peer-controlled the same way.

Why it matters

Suggested direction (for discussion, not prescriptive)

  • Sanitize at the record boundary in cleanRemote: strip @ and control characters/newlines from name, homeName, owner, keep the 60-char cap.
  • Negative tests: a published name containing another member's handle; a name with newlines/control characters.

Activity

  1. added a commit that references this issue on Oct 15, 2026
    a763683
  2. added a commit that references this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions