-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(cli): validate metadata.gatewayName type in normalizeSession #1283
Copy link
Copy link
Open
Labels
NemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).Use this label to identify issues with the NemoClaw command-line interface (CLI).bugSomething isn't workingSomething isn't working
Description
Bug
In src/lib/onboard-session.ts, normalizeSession copies metadata.gatewayName without checking its type. A persisted payload like { "metadata": { "gatewayName": 123 } } survives normalization, so loadSession() can return a Session where metadata.gatewayName is not a string.
Fix
Add typeof gatewayName === "string" check before copying it into the normalized session.
Found by
CodeRabbit review on #1272. Pre-existing from original JS.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).Use this label to identify issues with the NemoClaw command-line interface (CLI).bugSomething isn't workingSomething isn't working