Comfy-Org / Comfy-Org/comfy-multi-player

Concrete-input LWW is unauthenticated and stamp authority is duplicated across fields

Open
#15 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
5
Forks
1
Avg merge
12h 22m
Merged PRs (30d)
121

Description

Reviewed at `26995a3`.

The concrete-input LWW winner is decided by client-supplied `base_version` and `actor` (`src/stamps.ts:42,53`; `src/applier.ts:85`) with no bounds check, so a client can set an arbitrarily high `base_version` to always win. Separately, each op carries `actor`, `base_version`, AND a `stamp` tuple of the same values (`src/types.ts:64`); `stampKey()` prefers `stamp` and falls back to the envelope with no equality check (`src/stamps.ts:53-58`), so contradictory authority fields are representable and different consumers can read different values.

Direction (V1): validate/clamp `base_version` against the doc's known version at ingest; derive `actor` from the authenticated caller rather than trusting the op; assert `stamp` agrees with the envelope or drop one of the two representations.

Contributor guide

Open the contributing guide

Research direction

Start by reading src/stamps.ts:42,53-58, src/applier.ts:85, and the operation shape in src/types.ts:64, then trace where operations are ingested against the document version. Confirm that client-controlled authority cannot bypass version checks and that the envelope and stamp cannot disagree; done means contradictory or out-of-bounds authority is rejected or normalized consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend-api-design, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.