Dev roomserver fixes#27
Conversation
… bytes of the contacts pub key that posted the message to the room.
…es Also updated PR to allow login via map.
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 10
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } else if (contact?.type == advTypeRoom) { | ||
| _notificationService.showMessageNotification( | ||
| contactName: contact?.name ?? 'Unknown Room', | ||
| message: message.text.substring(4), |
There was a problem hiding this comment.
Missing bounds check causes crash on short messages
High Severity
The notification for room messages calls message.text.substring(4) without checking if the text is at least 4 characters long. This will throw a RangeError when a room message has fewer than 4 characters. The equivalent code in chat_screen.dart at line 939 correctly uses message.text.substring(4.clamp(0, message.text.length)) to prevent this crash.
|
|
||
| if (frame.length <= baseTextOffset) return null; | ||
|
|
||
| final fourBytePubMSG = frame.sublist(baseTextOffset, baseTextOffset + 4); |
There was a problem hiding this comment.
Insufficient frame length check causes sublist crash
High Severity
The bounds check at line 2038 only verifies frame.length > baseTextOffset, but line 2039 attempts to extract 4 bytes with frame.sublist(baseTextOffset, baseTextOffset + 4). This requires frame.length >= baseTextOffset + 4. When a frame has between baseTextOffset + 1 and baseTextOffset + 3 bytes, the sublist call will throw a RangeError, crashing message parsing.
flserial open asserts DTR (setDTR(true)); on boards with the stock 100nF DTR-reset cap (Seeed Wio-E5 / STM32WL on a USB-UART bridge) that edge reboots the MCU, and the device-query handshake then races the ~1.2-1.9s boot and times out. Wait 2500ms before returning so the board is ready. Harmless on boards that don't reset on DTR; well inside the upstream 5s command timeouts. Sibling to the meshcore.js DTR->RST fix (PR zjs81#27). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Based on #24
Note
Introduces Room support across parsing, persistence, UI, and navigation.
fourByteRoomContactKey) and attaches it toMessage; trims 4-byte prefix when rendering Room messages; differentiates notifications forchatvsroomfourByteRoomContactKeyinMessageStore(save/load) and exposes it viaMessage.copyWith[HEX], opens message path with resolved contact, and adds “Open Chat” action for Room messagesRoomLoginDialogand wires Room login into Contacts and Map flows (open/login room, then navigate to chat)Written by Cursor Bugbot for commit 8c3ffa5. This will update automatically on new commits. Configure here.