diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-27 11:47:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-27 11:47:17 +0900 |
| commit | 27183b2142e30a25975880012c00d203a9ebbf1a (patch) | |
| tree | fa39db23af4aed2cab709c1626c9b095038c69e9 /src/api | |
| parent | Refactor (diff) | |
| parent | Merge pull request #1304 from rinsuki/features/implement-media-video (diff) | |
| download | misskey-27183b2142e30a25975880012c00d203a9ebbf1a.tar.gz misskey-27183b2142e30a25975880012c00d203a9ebbf1a.tar.bz2 misskey-27183b2142e30a25975880012c00d203a9ebbf1a.zip | |
Merge branch 'master' of https://github.com/syuilo/misskey
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/models/user.ts | 2 | ||||
| -rw-r--r-- | src/api/private/signup.ts | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/api/models/user.ts b/src/api/models/user.ts index 3f0b10d4c2..d3875a65b9 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -59,6 +59,7 @@ export type IUser = { is_suspended: boolean; keywords: string[]; account: { + keypair: string; email: string; links: string[]; password: string; @@ -160,6 +161,7 @@ export const pack = ( delete _user.latest_post; // Remove private properties + delete _user.account.keypair; delete _user.account.password; delete _user.account.token; delete _user.account.two_factor_temp_secret; diff --git a/src/api/private/signup.ts b/src/api/private/signup.ts index 902642425c..690f3001cc 100644 --- a/src/api/private/signup.ts +++ b/src/api/private/signup.ts @@ -1,6 +1,7 @@ import * as uuid from 'uuid'; import * as express from 'express'; import * as bcrypt from 'bcryptjs'; +import { generate as generateKeypair } from '../../crypto_key'; import recaptcha = require('recaptcha-promise'); import User, { IUser, validateUsername, validatePassword, pack } from '../models/user'; import generateUserToken from '../common/generate-native-user-token'; @@ -119,6 +120,7 @@ export default async (req: express.Request, res: express.Response) => { username: username, username_lower: username.toLowerCase(), account: { + keypair: generateKeypair(), token: secret, email: null, links: null, |