You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parseTailscaleOwner returns null for real Tailscale UserIDs #526
AI-generated report. I ran the commands below and checked the output before posting.
parseTailscaleOwner returns null for real Tailscale UserIDs, so tailscaleIdentity() never reports the owner and a request through tailscale serve falls back to auth.via = "open" instead of "tailscale".
parseTailscaleOwner looks up parsed.User[String(parsed.Self.UserID)]. Tailscale UserIDs are larger than Number.MAX_SAFE_INTEGER, so JSON.parse rounds the number before the lookup and the key never matches.
From my machine (herdr web ui 0.3.52, Tailscale 1.102.4, Arch Linux, herdr plugin install):
$ tailscale status --json | jq '.Self.UserID'
15633668397603135
$ bun -e 'console.log(JSON.parse("{\"a\":15633668397603135}").a)'
15633668397603136
The User map key stays the exact string "15633668397603135", so User["15633668397603136"] is undefined and the owner is null.
Effect: until a device is paired, any device on the tailnet can drive the UI. After one device is paired, the owner's own other devices still have to pair. It happens every time.
The test at server/devices.test.ts:103 uses UserID: 99, which is safe, so it passes.
Activity
fix(access): read the PC's Tailscale owner from ids past 2^53 (#572)