Skip to content

fix(connector): verify the Anycubic LAN control TLS pin before login - #965

Merged
bloodf merged 1 commit into
mainfrom
orq/tp2nlu/ship-10
Nov 26, 2026
Merged

bloodf merged 1 commit into
mainfrom
orq/tp2nlu/ship-10

Conversation

@bloodf

@bloodf bloodf commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Held: awaiting the Full Review exact-head verdict. Please do not merge before it.

Follow-up to #963, which merged before its review fixes. Security fix for the Kobra 4 / Kobra S1 Max LAN control path:

  • TLS: the LAN control transport now builds its socket with connectAnycubicTls (the [low] Kobra X TLS pin is checked after the handshake #848 path used by the Kobra X client, transport.ts and provisioning) instead of disabling certificate checking and comparing the pin after the handshake. A wrong pin sends no MQTT bytes, so the username and password never reach an unverified server, and a CA plus a pin checks both.
  • Firmware guard: a test now covers firmware that changes between start-up and the command; nothing is sent.
  • publishWeb allowlist: a test now shows that a type outside info/light/print is refused and nothing is published.
  • Cancel outcome: a print that ends naturally during a cancel reports finished, not cancelled. Send-once with no resend is unchanged. This adds finished to the observation states accepted by the shared dispatcher (control/pause-dispatcher.ts).

Not reachable today, because ANYCUBIC_QUALIFIED_WRITES ships empty, but this is the code any qualified pair would use. Each fix has a test in tests/node/fix-963.test.ts that fails on revert.

Validated locally: unit check 1070 pass / 0 fail. Local typecheck errors were confined to tests/node/farm-route-authorization.test.ts, which needs a dependency missing from the local install (typescript-ast, added in #503). CI installs fresh. The host's required checks must pass on this head before merging.

Refs #963

(cherry picked from commit c7c02798020a10e7cbe60b33d1027dc02d2234c0)
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