mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +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:
parent
d9197faf3a
commit
2025cb5326
1 changed files with 1 additions and 1 deletions
|
|
@ -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")}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue