The device id is derived from the pubkey in JoinRequest, but the hub never checked the joiner actually held that key — anyone with a token could enroll claiming another device's identity. Now the client signs JoinChallenge(token, pubkey) with its ed25519 private key and the hub verifies it (ed25519.Verify) BEFORE redeeming the token — so a bad request can't burn a legitimate one-time token either. proto gains a Signature field + the shared JoinChallenge helper. Regression test: garbage/missing/wrong-key sigs all 401, token survives, valid join enrolls. |
||
|---|---|---|
| .. | ||
| blobstore | ||
| meta | ||
| blob_traversal_test.go | ||
| events.go | ||
| join_pop_test.go | ||
| limits_test.go | ||
| server.go | ||
| server_test.go | ||
| sharename.go | ||
| sharename_test.go | ||