Skip to content

fix(connector): stop first-come /link owner takeover across chat adapters - #1320

Open
DHDHLZ wants to merge 1 commit into
TraderAlice:devfrom
DHDHLZ:fix/connector-owner-link-guard
Open

fix(connector): stop first-come /link owner takeover across chat adapters#1320
DHDHLZ wants to merge 1 commit into
TraderAlice:devfrom
DHDHLZ:fix/connector-owner-link-guard

Conversation

@DHDHLZ

@DHDHLZ DHDHLZ commented Sep 2, 2026

Copy link
Copy Markdown

Security fix: messaging adapters bound the FIRST caller of /link as owner
when none was configured (Telegram, Discord, Slack, Feishu all shared the
same first-come logic).

Impact: bots are publicly reachable, so during the unlinked setup window
whoever messages /link first becomes the owner and inherits every
owner-gated surface (inbox, desk issues, and the UTA review/push actions).

Change:

  • /link now only binds a chat for the owner that is pre-configured in
    Connector settings (ownerUserId).
  • An unconfigured connector refuses to bind and explains the requirement,
    so there is no anonymous first-come path.

Tests:

  • new owner-link-guard.spec.ts: refuse-when-unconfigured, bind-for-
    configured-owner, reject-non-owner (36 connector adapter tests pass);
  • feishu.spec.ts updated from the old first-bind contract to the
    configured-owner contract;
  • npx tsc --noEmit passes.

…ters

Each messaging adapter (Telegram, Discord, Slack, Feishu) bound the first caller of /link as owner when none was configured. Because bots are publicly reachable, whoever messages /link during the unlinked setup window becomes the owner and inherits owner-gated surfaces (inbox, desk issues, UTA review actions).

Now /link only binds a chat for the owner pre-configured in Connector settings; an unconfigured connector refuses to bind and explains the requirement. Regression specs cover refuse-when-unconfigured, bind-for-configured-owner, and reject-non-owner.
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@DHDHLZ is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant