G1: F10 — fix pbuf NameError in PUSH_CODE_LOGIN_FAIL handler

Why: The LOGIN_FAILED handler in handle_rx referenced an undefined
identifier `pbuf` instead of the local BytesIO `dbuf`. Firmware emits
PUSH_CODE_LOGIN_FAIL as a fixed 8-byte frame, which trivially
satisfies the `len(data) > 7` guard, so every remote auth failure
raised NameError. The sibling LOGIN_SUCCESS handler a few lines above
already uses `dbuf.read(6).hex()` correctly; this commit aligns the
LOGIN_FAILED branch with the same pattern.

Refs: Forensics report finding F10 (S1)
This commit is contained in:
Matthew Wolter 2026-04-11 18:15:29 -07:00
parent d9197faf3a
commit 2025cb5326

View file

@ -555,7 +555,7 @@ class MessageReader:
dbuf.read(1)
if len(data) > 7:
res["pubkey_prefix"] = pbuf.read(6).hex()
res["pubkey_prefix"] = dbuf.read(6).hex()
attributes = {"pubkey_prefix": res.get("pubkey_prefix")}