github share/sharedb v7.0.0

latest release: v6.0.5
8 hours ago
  • #725 — 💥 BREAKING: Reject json0 ops that ot-json0 can only apply
    • A json0 op that isn't an array of components (eg a bare {p: ['x'], oi: 1}) used to commit as a silent no-op, and crashed servers using $fixup(). It's now rejected with ERR_OT_OP_BADLY_FORMED.
    • doc.submitOp() is unaffected, since it already normalizes ops. Code calling backend.submit() directly should wrap bare components in an array: [{p: ['x'], oi: 1}]
    • doc.submitOp() now calls back with an error instead of throwing if the type throws while normalizing the op
  • GHSA-94fr-2wj7-v4vj, GHSA-4fp7-5cq7-7mr6 — Type-check the versions, ids and collections clients send
    • Fixes an issue where a message with an unconvertible value (eg {toString: 1}) could crash a ShareDB server process
    • Fixes an issue where a non-string query collection name could let a client bypass access checks in query and readSnapshots middleware
    • Thanks to @shreyanshj10 for the original crash fix in #742, and to @dawidreedsy for reporting the middleware bypass!
  • #743 — Stop a failed subscribeBulk() orphaning in-flight streams
  • #745 — Stop stale remote presence catch-up looping forever
  • #750 — Ignore pollInterval and pollDebounce from clients
    • Set these on the database adapter instead, or map your own option onto context.options in query middleware
  • #753 — Only call _subscribe() once for concurrent subscribes to a channel
  • #754 — Document how to stop clients spoofing op src

Don't miss a new sharedb release

NewReleases is sending notifications on new releases.