mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-14 13:16:54 +00:00
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:
@@ -555,7 +555,7 @@ class MessageReader:
|
|||||||
dbuf.read(1)
|
dbuf.read(1)
|
||||||
|
|
||||||
if len(data) > 7:
|
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")}
|
attributes = {"pubkey_prefix": res.get("pubkey_prefix")}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user