diff options
| author | Adam Soltys <[email protected]> | 2025-01-07 19:57:48 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-01-07 19:57:48 -0800 |
| commit | 6cda2011da9e7fc53b728dacd023271604574f99 (patch) | |
| tree | 30092942f4294af4ddada5a2000e3f7b19eaba9f /routes | |
| parent | 7220097de888b2a3cf9d0f82c149e770d1f1db6d (diff) | |
| download | coinos-server-6cda2011da9e7fc53b728dacd023271604574f99.tar.gz coinos-server-6cda2011da9e7fc53b728dacd023271604574f99.zip | |
remove salt and cipher
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/routes/users.ts b/routes/users.ts index 07354403..f67721b7 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -149,13 +149,7 @@ export default { const ip = headers["cf-connecting-ip"]; if (!body.user) fail("no user object provided"); let { user } = body; - const fields = [ - "cipher", - "pubkey", - "password", - "username", - "salt", - ]; + const fields = ["pubkey", "password", "username"]; user = await register(pick(user, fields), ip); @@ -253,7 +247,6 @@ export default { "about", "autowithdraw", "banner", - "cipher", "currencies", "currency", "destination", @@ -271,7 +264,6 @@ export default { "pubkey", "push", "reserve", - "salt", "seed", "shopifyStore", "shopifyToken", @@ -374,7 +366,7 @@ export default { let user = await getUser(key); if (!user) { const k0 = await getProfile(key); - let username = k0?.name; + let username = k0?.name?.replace(/[^a-zA-Z0-9 ]/g, ""); const exists = await getUser(username); if (exists) username = key.substr(0, 24); @@ -558,8 +550,6 @@ export default { try { user.pin = null; - user.cipher = null; - user.salt = null; if (user.nsec) { const sk = randomBytes(32); |
