diff options
| author | Adam Soltys <[email protected]> | 2026-11-02 13:19:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-02 13:19:16 -0700 |
| commit | 10218ae86b464b8e3d29c27513eb5cc0554d044b (patch) | |
| tree | 4b7525c2d716c68a1ccbe6540e7f60c211fd2dc5 /routes | |
| parent | e3ab990961397ba821faaf3cee7d872175f77ffa (diff) | |
| download | coinos-server-10218ae86b464b8e3d29c27513eb5cc0554d044b.tar.gz coinos-server-10218ae86b464b8e3d29c27513eb5cc0554d044b.zip | |
users: ignore pubkey on signup, revoke a rekeyed account's nostr key
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts index e8fdddd5..9f730b6f 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -313,7 +313,10 @@ export default { } } - const fields = ["pubkey", "password", "username", "picture", "fresh"]; + // No pubkey: nothing here proves the caller holds that key, and register() + // points `user:<pubkey>` at the new account. Nostr accounts come from + // /nostrAuth, which verifies a signed challenge first. + const fields = ["password", "username", "picture", "fresh"]; user = await register(pick(user, fields), ip); const payload = { id: user.id }; |
