From e350307e6ad6262713cf5dee26bb17d27f7b34ac Mon Sep 17 00:00:00 2001 From: joseji Date: Mon, 28 Nov 2022 23:59:57 +0100 Subject: [PATCH 01/14] removing keys and passphrases --- backend/src/auth/CustomJwtPayload.ts | 2 +- backend/src/auth/JWT.ts | 4 +- .../graphql/resolver/TransactionResolver.ts | 10 +--- .../src/graphql/resolver/UserResolver.test.ts | 4 -- backend/src/graphql/resolver/UserResolver.ts | 46 +------------------ backend/src/util/communityUser.ts | 3 -- .../0053-change_password_encryption/User.ts | 15 ------ .../UserContact.ts | 3 -- 8 files changed, 5 insertions(+), 82 deletions(-) diff --git a/backend/src/auth/CustomJwtPayload.ts b/backend/src/auth/CustomJwtPayload.ts index 2b52c3cea..7966b413e 100644 --- a/backend/src/auth/CustomJwtPayload.ts +++ b/backend/src/auth/CustomJwtPayload.ts @@ -1,5 +1,5 @@ import { JwtPayload } from 'jsonwebtoken' export interface CustomJwtPayload extends JwtPayload { - pubKey: Buffer + gradidoID: string } diff --git a/backend/src/auth/JWT.ts b/backend/src/auth/JWT.ts index e32e68223..8399c881b 100644 --- a/backend/src/auth/JWT.ts +++ b/backend/src/auth/JWT.ts @@ -11,8 +11,8 @@ export const decode = (token: string): CustomJwtPayload | null => { } } -export const encode = (pubKey: Buffer): string => { - const token = jwt.sign({ pubKey }, CONFIG.JWT_SECRET, { +export const encode = (gradidoID: string): string => { + const token = jwt.sign({ gradidoID }, CONFIG.JWT_SECRET, { expiresIn: CONFIG.JWT_EXPIRES_IN, }) return token diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 594039cfd..18adcb5c8 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -26,7 +26,7 @@ import { Transaction as dbTransaction } from '@entity/Transaction' import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink' import { TransactionTypeId } from '@enum/TransactionTypeId' -import { calculateBalance, isHexPublicKey } from '@/util/validate' +import { calculateBalance } from '@/util/validate' import { RIGHTS } from '@/auth/RIGHTS' import { User } from '@model/User' import { communityUser } from '@/util/communityUser' @@ -317,10 +317,6 @@ export class TransactionResolver { // TODO this is subject to replay attacks const senderUser = getUser(context) - if (senderUser.pubKey.length !== 32) { - logger.error(`invalid sender public key:${senderUser.pubKey}`) - throw new Error('invalid sender public key') - } // validate recipient user const recipientUser = await findUserByEmail(email) @@ -349,10 +345,6 @@ export class TransactionResolver { logger.error(`The recipient account is not activated: recipientUser=${recipientUser}`) throw new Error('The recipient account is not activated') } - if (!isHexPublicKey(recipientUser.pubKey.toString('hex'))) { - logger.error(`invalid recipient public key: recipientUser=${recipientUser}`) - throw new Error('invalid recipient public key') - } await executeTransaction(amount, memo, senderUser, recipientUser) logger.info( diff --git a/backend/src/graphql/resolver/UserResolver.test.ts b/backend/src/graphql/resolver/UserResolver.test.ts index d8472fba9..411cd277a 100644 --- a/backend/src/graphql/resolver/UserResolver.test.ts +++ b/backend/src/graphql/resolver/UserResolver.test.ts @@ -137,12 +137,8 @@ describe('UserResolver', () => { firstName: 'Peter', lastName: 'Lustig', password: '0', - pubKey: null, - privKey: null, - // emailHash: expect.any(Buffer), createdAt: expect.any(Date), // emailChecked: false, - passphrase: expect.any(String), language: 'de', isAdmin: null, deletedAt: null, diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 752c585fd..b28cb7c4b 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -297,11 +297,6 @@ export class UserResolver { // TODO we want to catch this on the frontend and ask the user to check his emails or resend code throw new Error('User has no password set yet') } - if (!dbUser.pubKey || !dbUser.privKey) { - logger.error('The User has no private or publicKey.') - // TODO we want to catch this on the frontend and ask the user to check his emails or resend code - throw new Error('User has no private or publicKey') - } if (!verifyPassword(dbUser, password)) { logger.error('The User has no valid credentials.') @@ -333,7 +328,7 @@ export class UserResolver { context.setHeaders.push({ key: 'token', - value: encode(dbUser.pubKey), + value: encode(dbUser.gradidoID), }) const ev = new EventLogin() ev.userId = user.id @@ -443,7 +438,6 @@ export class UserResolver { dbUser.language = language dbUser.publisherId = publisherId dbUser.passwordEncryptionType = PasswordEncryptionType.NO_PASSWORD - dbUser.passphrase = passphrase.join(' ') logger.debug('new dbUser=' + dbUser) if (redeemCode) { if (redeemCode.match(/^CL-/)) { @@ -633,34 +627,12 @@ export class UserResolver { const user = userContact.user logger.debug('user with EmailVerificationCode found...') - // Generate Passphrase if needed - if (!user.passphrase) { - const passphrase = PassphraseGenerate() - user.passphrase = passphrase.join(' ') - logger.debug('new Passphrase generated...') - } - - const passphrase = user.passphrase.split(' ') - if (passphrase.length < PHRASE_WORD_COUNT) { - logger.error('Could not load a correct passphrase') - // TODO if this can happen we cannot recover from that - // this seem to be good on production data, if we dont - // make a coding mistake we do not have a problem here - throw new Error('Could not load a correct passphrase') - } - logger.debug('Passphrase is valid...') - // Activate EMail userContact.emailChecked = true // Update Password user.passwordEncryptionType = PasswordEncryptionType.GRADIDO_ID - const passwordHash = SecretKeyCryptographyCreateKey(userContact.email, password) // return short and long hash - const keyPair = KeyPairEd25519Create(passphrase) // return pub, priv Key - const encryptedPrivkey = SecretKeyCryptographyEncrypt(keyPair[1], passwordHash[1]) user.password = encryptPassword(user, password) - user.pubKey = keyPair[0] - user.privKey = encryptedPrivkey logger.debug('User credentials updated ...') const queryRunner = getConnection().createQueryRunner() @@ -771,30 +743,14 @@ export class UserResolver { ) } - // TODO: This had some error cases defined - like missing private key. This is no longer checked. - const oldPasswordHash = SecretKeyCryptographyCreateKey( - userEntity.emailContact.email, - password, - ) if (!verifyPassword(userEntity, password)) { logger.error(`Old password is invalid`) throw new Error(`Old password is invalid`) } - const privKey = SecretKeyCryptographyDecrypt(userEntity.privKey, oldPasswordHash[1]) - logger.debug('oldPassword decrypted...') - const newPasswordHash = SecretKeyCryptographyCreateKey( - userEntity.emailContact.email, - passwordNew, - ) // return short and long hash - logger.debug('newPasswordHash created...') - const encryptedPrivkey = SecretKeyCryptographyEncrypt(privKey, newPasswordHash[1]) - logger.debug('PrivateKey encrypted...') - // Save new password hash and newly encrypted private key userEntity.passwordEncryptionType = PasswordEncryptionType.GRADIDO_ID userEntity.password = encryptPassword(userEntity, passwordNew) - userEntity.privKey = encryptedPrivkey } const queryRunner = getConnection().createQueryRunner() diff --git a/backend/src/util/communityUser.ts b/backend/src/util/communityUser.ts index 298348f0f..98279db15 100644 --- a/backend/src/util/communityUser.ts +++ b/backend/src/util/communityUser.ts @@ -16,8 +16,6 @@ const communityDbUser: dbUser = { emailId: -1, firstName: 'Gradido', lastName: 'Akademie', - pubKey: Buffer.from(''), - privKey: Buffer.from(''), deletedAt: null, password: BigInt(0), // emailHash: Buffer.from(''), @@ -26,7 +24,6 @@ const communityDbUser: dbUser = { language: '', isAdmin: null, publisherId: 0, - passphrase: '', // default password encryption type passwordEncryptionType: PasswordEncryptionType.NO_PASSWORD, hasId: function (): boolean { diff --git a/database/entity/0053-change_password_encryption/User.ts b/database/entity/0053-change_password_encryption/User.ts index 2a3332925..c511a98c8 100644 --- a/database/entity/0053-change_password_encryption/User.ts +++ b/database/entity/0053-change_password_encryption/User.ts @@ -34,21 +34,6 @@ export class User extends BaseEntity { }) alias: string - @Column({ name: 'public_key', type: 'binary', length: 32, default: null, nullable: true }) - pubKey: Buffer - - @Column({ name: 'privkey', type: 'binary', length: 80, default: null, nullable: true }) - privKey: Buffer - - @Column({ - type: 'text', - name: 'passphrase', - collation: 'utf8mb4_unicode_ci', - nullable: true, - default: null, - }) - passphrase: string - @OneToOne(() => UserContact, (emailContact: UserContact) => emailContact.user) @JoinColumn({ name: 'email_id' }) emailContact: UserContact diff --git a/database/entity/0053-change_password_encryption/UserContact.ts b/database/entity/0053-change_password_encryption/UserContact.ts index 97b12d4cd..c101fba4c 100644 --- a/database/entity/0053-change_password_encryption/UserContact.ts +++ b/database/entity/0053-change_password_encryption/UserContact.ts @@ -40,9 +40,6 @@ export class UserContact extends BaseEntity { @Column({ name: 'email_resend_count' }) emailResendCount: number - // @Column({ name: 'email_hash', type: 'binary', length: 32, default: null, nullable: true }) - // emailHash: Buffer - @Column({ name: 'email_checked', type: 'bool', nullable: false, default: false }) emailChecked: boolean From 7e78f1c893506c4d677b323005d105b5aa95c695 Mon Sep 17 00:00:00 2001 From: joseji Date: Tue, 29 Nov 2022 13:03:10 +0100 Subject: [PATCH 02/14] migration fixed --- backend/src/auth/CustomJwtPayload.ts | 2 +- backend/src/auth/JWT.ts | 2 +- backend/src/config/index.ts | 2 +- backend/src/graphql/resolver/UserResolver.ts | 2 +- .../0053-change_password_encryption/User.ts | 15 +++ .../UserContact.ts | 3 + .../0055-clear_old_password_junk/User.ts | 112 ++++++++++++++++++ .../UserContact.ts | 57 +++++++++ database/entity/User.ts | 2 +- database/entity/UserContact.ts | 2 +- .../0055-clear_old_password_junk.ts | 16 +++ 11 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 database/entity/0055-clear_old_password_junk/User.ts create mode 100644 database/entity/0055-clear_old_password_junk/UserContact.ts create mode 100644 database/migrations/0055-clear_old_password_junk.ts diff --git a/backend/src/auth/CustomJwtPayload.ts b/backend/src/auth/CustomJwtPayload.ts index 7966b413e..346ff143a 100644 --- a/backend/src/auth/CustomJwtPayload.ts +++ b/backend/src/auth/CustomJwtPayload.ts @@ -1,5 +1,5 @@ import { JwtPayload } from 'jsonwebtoken' export interface CustomJwtPayload extends JwtPayload { - gradidoID: string + gradidoID: Buffer } diff --git a/backend/src/auth/JWT.ts b/backend/src/auth/JWT.ts index 8399c881b..961274eb3 100644 --- a/backend/src/auth/JWT.ts +++ b/backend/src/auth/JWT.ts @@ -11,7 +11,7 @@ export const decode = (token: string): CustomJwtPayload | null => { } } -export const encode = (gradidoID: string): string => { +export const encode = (gradidoID: Buffer): string => { const token = jwt.sign({ gradidoID }, CONFIG.JWT_SECRET, { expiresIn: CONFIG.JWT_EXPIRES_IN, }) diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index c9e5ea79f..ede230349 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -10,7 +10,7 @@ Decimal.set({ }) const constants = { - DB_VERSION: '0054-recalculate_balance_and_decay', + DB_VERSION: '0055-clear_old_password_junk', DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0 LOG4JS_CONFIG: 'log4js-config.json', // default log level on production should be info diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index b28cb7c4b..db8169db1 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -328,7 +328,7 @@ export class UserResolver { context.setHeaders.push({ key: 'token', - value: encode(dbUser.gradidoID), + value: encode(Buffer.from(dbUser.gradidoID)), }) const ev = new EventLogin() ev.userId = user.id diff --git a/database/entity/0053-change_password_encryption/User.ts b/database/entity/0053-change_password_encryption/User.ts index c511a98c8..2a3332925 100644 --- a/database/entity/0053-change_password_encryption/User.ts +++ b/database/entity/0053-change_password_encryption/User.ts @@ -34,6 +34,21 @@ export class User extends BaseEntity { }) alias: string + @Column({ name: 'public_key', type: 'binary', length: 32, default: null, nullable: true }) + pubKey: Buffer + + @Column({ name: 'privkey', type: 'binary', length: 80, default: null, nullable: true }) + privKey: Buffer + + @Column({ + type: 'text', + name: 'passphrase', + collation: 'utf8mb4_unicode_ci', + nullable: true, + default: null, + }) + passphrase: string + @OneToOne(() => UserContact, (emailContact: UserContact) => emailContact.user) @JoinColumn({ name: 'email_id' }) emailContact: UserContact diff --git a/database/entity/0053-change_password_encryption/UserContact.ts b/database/entity/0053-change_password_encryption/UserContact.ts index c101fba4c..97b12d4cd 100644 --- a/database/entity/0053-change_password_encryption/UserContact.ts +++ b/database/entity/0053-change_password_encryption/UserContact.ts @@ -40,6 +40,9 @@ export class UserContact extends BaseEntity { @Column({ name: 'email_resend_count' }) emailResendCount: number + // @Column({ name: 'email_hash', type: 'binary', length: 32, default: null, nullable: true }) + // emailHash: Buffer + @Column({ name: 'email_checked', type: 'bool', nullable: false, default: false }) emailChecked: boolean diff --git a/database/entity/0055-clear_old_password_junk/User.ts b/database/entity/0055-clear_old_password_junk/User.ts new file mode 100644 index 000000000..c511a98c8 --- /dev/null +++ b/database/entity/0055-clear_old_password_junk/User.ts @@ -0,0 +1,112 @@ +import { + BaseEntity, + Entity, + PrimaryGeneratedColumn, + Column, + DeleteDateColumn, + OneToMany, + JoinColumn, + OneToOne, +} from 'typeorm' +import { Contribution } from '../Contribution' +import { ContributionMessage } from '../ContributionMessage' +import { UserContact } from '../UserContact' + +@Entity('users', { engine: 'InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' }) +export class User extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @Column({ + name: 'gradido_id', + length: 36, + nullable: false, + collation: 'utf8mb4_unicode_ci', + }) + gradidoID: string + + @Column({ + name: 'alias', + length: 20, + nullable: true, + default: null, + collation: 'utf8mb4_unicode_ci', + }) + alias: string + + @OneToOne(() => UserContact, (emailContact: UserContact) => emailContact.user) + @JoinColumn({ name: 'email_id' }) + emailContact: UserContact + + @Column({ name: 'email_id', type: 'int', unsigned: true, nullable: true, default: null }) + emailId: number | null + + @Column({ + name: 'first_name', + length: 255, + nullable: true, + default: null, + collation: 'utf8mb4_unicode_ci', + }) + firstName: string + + @Column({ + name: 'last_name', + length: 255, + nullable: true, + default: null, + collation: 'utf8mb4_unicode_ci', + }) + lastName: string + + @Column({ name: 'created_at', default: () => 'CURRENT_TIMESTAMP', nullable: false }) + createdAt: Date + + @DeleteDateColumn({ name: 'deleted_at', nullable: true }) + deletedAt: Date | null + + @Column({ type: 'bigint', default: 0, unsigned: true }) + password: BigInt + + @Column({ + name: 'password_encryption_type', + type: 'int', + unsigned: true, + nullable: false, + default: 0, + }) + passwordEncryptionType: number + + @Column({ length: 4, default: 'de', collation: 'utf8mb4_unicode_ci', nullable: false }) + language: string + + @Column({ name: 'is_admin', type: 'datetime', nullable: true, default: null }) + isAdmin: Date | null + + @Column({ name: 'referrer_id', type: 'int', unsigned: true, nullable: true, default: null }) + referrerId?: number | null + + @Column({ + name: 'contribution_link_id', + type: 'int', + unsigned: true, + nullable: true, + default: null, + }) + contributionLinkId?: number | null + + @Column({ name: 'publisher_id', default: 0 }) + publisherId: number + + @OneToMany(() => Contribution, (contribution) => contribution.user) + @JoinColumn({ name: 'user_id' }) + contributions?: Contribution[] + + @OneToMany(() => ContributionMessage, (message) => message.user) + @JoinColumn({ name: 'user_id' }) + messages?: ContributionMessage[] + + @OneToMany(() => UserContact, (userContact: UserContact) => userContact.user) + @JoinColumn({ name: 'user_id' }) + userContacts?: UserContact[] +} diff --git a/database/entity/0055-clear_old_password_junk/UserContact.ts b/database/entity/0055-clear_old_password_junk/UserContact.ts new file mode 100644 index 000000000..c101fba4c --- /dev/null +++ b/database/entity/0055-clear_old_password_junk/UserContact.ts @@ -0,0 +1,57 @@ +import { + BaseEntity, + Entity, + PrimaryGeneratedColumn, + Column, + DeleteDateColumn, + OneToOne, +} from 'typeorm' +import { User } from './User' + +@Entity('user_contacts', { engine: 'InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' }) +export class UserContact extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @Column({ + name: 'type', + length: 100, + nullable: true, + default: null, + collation: 'utf8mb4_unicode_ci', + }) + type: string + + @OneToOne(() => User, (user) => user.emailContact) + user: User + + @Column({ name: 'user_id', type: 'int', unsigned: true, nullable: false }) + userId: number + + @Column({ length: 255, unique: true, nullable: false, collation: 'utf8mb4_unicode_ci' }) + email: string + + @Column({ name: 'email_verification_code', type: 'bigint', unsigned: true, unique: true }) + emailVerificationCode: BigInt + + @Column({ name: 'email_opt_in_type_id' }) + emailOptInTypeId: number + + @Column({ name: 'email_resend_count' }) + emailResendCount: number + + @Column({ name: 'email_checked', type: 'bool', nullable: false, default: false }) + emailChecked: boolean + + @Column({ length: 255, unique: false, nullable: true, collation: 'utf8mb4_unicode_ci' }) + phone: string + + @Column({ name: 'created_at', default: () => 'CURRENT_TIMESTAMP', nullable: false }) + createdAt: Date + + @Column({ name: 'updated_at', nullable: true, default: null, type: 'datetime' }) + updatedAt: Date | null + + @DeleteDateColumn({ name: 'deleted_at', nullable: true }) + deletedAt: Date | null +} diff --git a/database/entity/User.ts b/database/entity/User.ts index b3c00a9b4..07c0ef335 100644 --- a/database/entity/User.ts +++ b/database/entity/User.ts @@ -1 +1 @@ -export { User } from './0053-change_password_encryption/User' +export { User } from './0055-clear_old_password_junk/User' diff --git a/database/entity/UserContact.ts b/database/entity/UserContact.ts index dd74e65c4..5c923c92b 100644 --- a/database/entity/UserContact.ts +++ b/database/entity/UserContact.ts @@ -1 +1 @@ -export { UserContact } from './0053-change_password_encryption/UserContact' +export { UserContact } from './0055-clear_old_password_junk/UserContact' diff --git a/database/migrations/0055-clear_old_password_junk.ts b/database/migrations/0055-clear_old_password_junk.ts new file mode 100644 index 000000000..3e6f3f76a --- /dev/null +++ b/database/migrations/0055-clear_old_password_junk.ts @@ -0,0 +1,16 @@ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export async function upgrade(queryFn: (query: string, values?: any[]) => Promise>) { + await queryFn('ALTER TABLE users DROP COLUMN public_key;') + await queryFn('ALTER TABLE users DROP COLUMN privkey;') + await queryFn('ALTER TABLE users DROP COLUMN email_hash;') + await queryFn('ALTER TABLE users DROP COLUMN passphrase;') +} + +export async function downgrade(queryFn: (query: string, values?: any[]) => Promise>) { + await queryFn('ALTER TABLE users ADD COLUMN public_key binary(32) DEFAULT NULL;') + await queryFn('ALTER TABLE users ADD COLUMN privkey binary(80) DEFAULT NULL;') + await queryFn('ALTER TABLE users ADD COLUMN email_hash binary(32) DEFAULT NULL;') + await queryFn('ALTER TABLE users ADD COLUMN passphrase text DEFAULT NULL;') +} From 81f60667543a836b0941bee042b4ff744dd88ccc Mon Sep 17 00:00:00 2001 From: joseji Date: Tue, 29 Nov 2022 13:06:17 +0100 Subject: [PATCH 03/14] removed unused code --- backend/src/graphql/resolver/UserResolver.ts | 95 -------------------- 1 file changed, 95 deletions(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index db8169db1..626ff9705 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -55,89 +55,6 @@ const isLanguage = (language: string): boolean => { return LANGUAGES.includes(language) } -const PHRASE_WORD_COUNT = 24 -const WORDS = fs - .readFileSync('src/config/mnemonic.uncompressed_buffer13116.txt') - .toString() - .split(',') -const PassphraseGenerate = (): string[] => { - logger.trace('PassphraseGenerate...') - const result = [] - for (let i = 0; i < PHRASE_WORD_COUNT; i++) { - result.push(WORDS[sodium.randombytes_random() % 2048]) - } - return result -} - -const KeyPairEd25519Create = (passphrase: string[]): Buffer[] => { - logger.trace('KeyPairEd25519Create...') - if (!passphrase.length || passphrase.length < PHRASE_WORD_COUNT) { - logger.error('passphrase empty or to short') - throw new Error('passphrase empty or to short') - } - - const state = Buffer.alloc(sodium.crypto_hash_sha512_STATEBYTES) - sodium.crypto_hash_sha512_init(state) - - // To prevent breaking existing passphrase-hash combinations word indices will be put into 64 Bit Variable to mimic first implementation of algorithms - for (let i = 0; i < PHRASE_WORD_COUNT; i++) { - const value = Buffer.alloc(8) - const wordIndex = WORDS.indexOf(passphrase[i]) - value.writeBigInt64LE(BigInt(wordIndex)) - sodium.crypto_hash_sha512_update(state, value) - } - // trailing space is part of the login_server implementation - const clearPassphrase = passphrase.join(' ') + ' ' - sodium.crypto_hash_sha512_update(state, Buffer.from(clearPassphrase)) - const outputHashBuffer = Buffer.alloc(sodium.crypto_hash_sha512_BYTES) - sodium.crypto_hash_sha512_final(state, outputHashBuffer) - - const pubKey = Buffer.alloc(sodium.crypto_sign_PUBLICKEYBYTES) - const privKey = Buffer.alloc(sodium.crypto_sign_SECRETKEYBYTES) - - sodium.crypto_sign_seed_keypair( - pubKey, - privKey, - outputHashBuffer.slice(0, sodium.crypto_sign_SEEDBYTES), - ) - logger.debug(`KeyPair creation ready. pubKey=${pubKey}`) - - return [pubKey, privKey] -} - -/* -const getEmailHash = (email: string): Buffer => { - logger.trace('getEmailHash...') - const emailHash = Buffer.alloc(sodium.crypto_generichash_BYTES) - sodium.crypto_generichash(emailHash, Buffer.from(email)) - logger.debug(`getEmailHash...successful: ${emailHash}`) - return emailHash -} -*/ - -const SecretKeyCryptographyEncrypt = (message: Buffer, encryptionKey: Buffer): Buffer => { - logger.trace('SecretKeyCryptographyEncrypt...') - const encrypted = Buffer.alloc(message.length + sodium.crypto_secretbox_MACBYTES) - const nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES) - nonce.fill(31) // static nonce - - sodium.crypto_secretbox_easy(encrypted, message, nonce, encryptionKey) - logger.debug(`SecretKeyCryptographyEncrypt...successful: ${encrypted}`) - return encrypted -} - -const SecretKeyCryptographyDecrypt = (encryptedMessage: Buffer, encryptionKey: Buffer): Buffer => { - logger.trace('SecretKeyCryptographyDecrypt...') - const message = Buffer.alloc(encryptedMessage.length - sodium.crypto_secretbox_MACBYTES) - const nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES) - nonce.fill(31) // static nonce - - sodium.crypto_secretbox_open_easy(message, encryptedMessage, nonce, encryptionKey) - - logger.debug(`SecretKeyCryptographyDecrypt...successful: ${message}`) - return message -} - const newEmailContact = (email: string, userId: number): DbUserContact => { logger.trace(`newEmailContact...`) const emailContact = new DbUserContact() @@ -265,7 +182,6 @@ export class UserResolver { const clientTimezoneOffset = getClientTimezoneOffset(context) const userEntity = getUser(context) const user = new User(userEntity, await getUserCreation(userEntity.id, clientTimezoneOffset)) - // user.pubkey = userEntity.pubKey.toString('hex') // Elopage Status & Stored PublisherId user.hasElopage = await this.hasElopage(context) @@ -420,11 +336,6 @@ export class UserResolver { } } - const passphrase = PassphraseGenerate() - // const keyPair = KeyPairEd25519Create(passphrase) // return pub, priv Key - // const passwordHash = SecretKeyCryptographyCreateKey(email, password) // return short and long hash - // const encryptedPrivkey = SecretKeyCryptographyEncrypt(keyPair[1], passwordHash[1]) - // const emailHash = getEmailHash(email) const gradidoID = await newGradidoID() const eventRegister = new EventRegister() @@ -458,12 +369,6 @@ export class UserResolver { } } } - // TODO this field has no null allowed unlike the loginServer table - // dbUser.pubKey = Buffer.from(randomBytes(32)) // Buffer.alloc(32, 0) default to 0000... - // dbUser.pubkey = keyPair[0] - // loginUser.password = passwordHash[0].readBigUInt64LE() // using the shorthash - // loginUser.pubKey = keyPair[0] - // loginUser.privKey = encryptedPrivkey const queryRunner = getConnection().createQueryRunner() await queryRunner.connect() From 7fe7b98dfe8413f1275f551006ed617a00fc8c89 Mon Sep 17 00:00:00 2001 From: joseji Date: Tue, 29 Nov 2022 13:10:33 +0100 Subject: [PATCH 04/14] removing non necessary functions --- backend/src/graphql/resolver/UserResolver.ts | 3 +-- backend/src/util/validate.ts | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 626ff9705..c1c4903f8 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -1,4 +1,3 @@ -import fs from 'fs' import { backendLogger as logger } from '@/server/logger' import i18n from 'i18n' import { Context, getUser, getClientTimezoneOffset } from '@/server/context' @@ -40,7 +39,7 @@ import { SearchAdminUsersResult } from '@model/AdminUser' import Paginated from '@arg/Paginated' import { Order } from '@enum/Order' import { v4 as uuidv4 } from 'uuid' -import { isValidPassword, SecretKeyCryptographyCreateKey } from '@/password/EncryptorUtils' +import { isValidPassword } from '@/password/EncryptorUtils' import { encryptPassword, verifyPassword } from '@/password/PasswordEncryptor' import { PasswordEncryptionType } from '../enum/PasswordEncryptionType' diff --git a/backend/src/util/validate.ts b/backend/src/util/validate.ts index edd8d55f6..837aef895 100644 --- a/backend/src/util/validate.ts +++ b/backend/src/util/validate.ts @@ -14,10 +14,6 @@ function isStringBoolean(value: string): boolean { return false } -function isHexPublicKey(publicKey: string): boolean { - return /^[0-9A-Fa-f]{64}$/i.test(publicKey) -} - async function calculateBalance( userId: number, amount: Decimal, From 9604a6309a805ddc7e9fcde26347ff65d4bd9e24 Mon Sep 17 00:00:00 2001 From: joseji Date: Tue, 6 Dec 2022 22:31:15 +0100 Subject: [PATCH 05/14] found more and more junk everywhere, almost cleared --- backend/src/auth/CustomJwtPayload.ts | 2 +- backend/src/auth/JWT.ts | 2 +- backend/src/graphql/directive/isAuthorized.ts | 12 +++++------- backend/src/graphql/resolver/UserResolver.ts | 2 +- backend/src/typeorm/repository/User.ts | 15 --------------- backend/src/util/validate.ts | 2 +- 6 files changed, 9 insertions(+), 26 deletions(-) diff --git a/backend/src/auth/CustomJwtPayload.ts b/backend/src/auth/CustomJwtPayload.ts index 346ff143a..7966b413e 100644 --- a/backend/src/auth/CustomJwtPayload.ts +++ b/backend/src/auth/CustomJwtPayload.ts @@ -1,5 +1,5 @@ import { JwtPayload } from 'jsonwebtoken' export interface CustomJwtPayload extends JwtPayload { - gradidoID: Buffer + gradidoID: string } diff --git a/backend/src/auth/JWT.ts b/backend/src/auth/JWT.ts index 961274eb3..8399c881b 100644 --- a/backend/src/auth/JWT.ts +++ b/backend/src/auth/JWT.ts @@ -11,7 +11,7 @@ export const decode = (token: string): CustomJwtPayload | null => { } } -export const encode = (gradidoID: Buffer): string => { +export const encode = (gradidoID: string): string => { const token = jwt.sign({ gradidoID }, CONFIG.JWT_SECRET, { expiresIn: CONFIG.JWT_EXPIRES_IN, }) diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts index c24cde47a..8840810ea 100644 --- a/backend/src/graphql/directive/isAuthorized.ts +++ b/backend/src/graphql/directive/isAuthorized.ts @@ -5,9 +5,8 @@ import { AuthChecker } from 'type-graphql' import { decode, encode } from '@/auth/JWT' import { ROLE_UNAUTHORIZED, ROLE_USER, ROLE_ADMIN } from '@/auth/ROLES' import { RIGHTS } from '@/auth/RIGHTS' -import { getCustomRepository } from '@dbTools/typeorm' -import { UserRepository } from '@repository/User' import { INALIENABLE_RIGHTS } from '@/auth/INALIENABLE_RIGHTS' +import { User } from '@entity/User' const isAuthorized: AuthChecker = async ({ context }, rights) => { context.role = ROLE_UNAUTHORIZED // unauthorized user @@ -26,14 +25,13 @@ const isAuthorized: AuthChecker = async ({ context }, rights) => { if (!decoded) { throw new Error('403.13 - Client certificate revoked') } - // Set context pubKey - context.pubKey = Buffer.from(decoded.pubKey).toString('hex') + // Set context gradidoID + context.gradidoID = decoded.gradidoID // TODO - load from database dynamically & admin - maybe encode this in the token to prevent many database requests // TODO this implementation is bullshit - two database queries cause our user identifiers are not aligned and vary between email, id and pubKey - const userRepository = getCustomRepository(UserRepository) try { - const user = await userRepository.findByPubkeyHex(context.pubKey) + const user = await User.findOneOrFail({ where: { gradidoID: decoded.gradidoID } }) context.user = user context.role = user.isAdmin ? ROLE_ADMIN : ROLE_USER } catch { @@ -48,7 +46,7 @@ const isAuthorized: AuthChecker = async ({ context }, rights) => { } // set new header token - context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) }) + context.setHeaders.push({ key: 'token', value: encode(decoded.gradidoID) }) return true } diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index c1c4903f8..a4aba1e3c 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -243,7 +243,7 @@ export class UserResolver { context.setHeaders.push({ key: 'token', - value: encode(Buffer.from(dbUser.gradidoID)), + value: encode(dbUser.gradidoID), }) const ev = new EventLogin() ev.userId = user.id diff --git a/backend/src/typeorm/repository/User.ts b/backend/src/typeorm/repository/User.ts index c20ef85ff..4972aa9c4 100644 --- a/backend/src/typeorm/repository/User.ts +++ b/backend/src/typeorm/repository/User.ts @@ -4,21 +4,6 @@ import { User as DbUser } from '@entity/User' @EntityRepository(DbUser) export class UserRepository extends Repository { - async findByPubkeyHex(pubkeyHex: string): Promise { - const dbUser = await this.createQueryBuilder('user') - .leftJoinAndSelect('user.emailContact', 'emailContact') - .where('hex(user.pubKey) = :pubkeyHex', { pubkeyHex }) - .getOneOrFail() - /* - const dbUser = await this.findOneOrFail(`hex(user.pubKey) = { pubkeyHex }`) - const emailContact = await this.query( - `SELECT * from user_contacts where id = { dbUser.emailId }`, - ) - dbUser.emailContact = emailContact - */ - return dbUser - } - async findBySearchCriteriaPagedFiltered( select: string[], searchCriteria: string, diff --git a/backend/src/util/validate.ts b/backend/src/util/validate.ts index 837aef895..437e04189 100644 --- a/backend/src/util/validate.ts +++ b/backend/src/util/validate.ts @@ -41,4 +41,4 @@ async function calculateBalance( return { balance, lastTransactionId: lastTransaction.id, decay } } -export { isHexPublicKey, calculateBalance, isStringBoolean } +export { calculateBalance, isStringBoolean } From 7b8d4e5c85e131c0e1bedac329a477916ee5e6f3 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 13 Dec 2022 20:54:07 +0100 Subject: [PATCH 06/14] update database version --- .../User.ts | 0 .../UserContact.ts | 0 database/entity/User.ts | 2 +- database/entity/UserContact.ts | 2 +- ...ear_old_password_junk.ts => 0057-clear_old_password_junk.ts} | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename database/entity/{0055-clear_old_password_junk => 0057-clear_old_password_junk}/User.ts (100%) rename database/entity/{0055-clear_old_password_junk => 0057-clear_old_password_junk}/UserContact.ts (100%) rename database/migrations/{0055-clear_old_password_junk.ts => 0057-clear_old_password_junk.ts} (100%) diff --git a/database/entity/0055-clear_old_password_junk/User.ts b/database/entity/0057-clear_old_password_junk/User.ts similarity index 100% rename from database/entity/0055-clear_old_password_junk/User.ts rename to database/entity/0057-clear_old_password_junk/User.ts diff --git a/database/entity/0055-clear_old_password_junk/UserContact.ts b/database/entity/0057-clear_old_password_junk/UserContact.ts similarity index 100% rename from database/entity/0055-clear_old_password_junk/UserContact.ts rename to database/entity/0057-clear_old_password_junk/UserContact.ts diff --git a/database/entity/User.ts b/database/entity/User.ts index 07c0ef335..5cffc688e 100644 --- a/database/entity/User.ts +++ b/database/entity/User.ts @@ -1 +1 @@ -export { User } from './0055-clear_old_password_junk/User' +export { User } from './0057-clear_old_password_junk/User' diff --git a/database/entity/UserContact.ts b/database/entity/UserContact.ts index 5c923c92b..17d4575b0 100644 --- a/database/entity/UserContact.ts +++ b/database/entity/UserContact.ts @@ -1 +1 @@ -export { UserContact } from './0055-clear_old_password_junk/UserContact' +export { UserContact } from './0057-clear_old_password_junk/UserContact' diff --git a/database/migrations/0055-clear_old_password_junk.ts b/database/migrations/0057-clear_old_password_junk.ts similarity index 100% rename from database/migrations/0055-clear_old_password_junk.ts rename to database/migrations/0057-clear_old_password_junk.ts From b52c62749c9f2dd812f457d0e61658fcf600d94e Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 13 Dec 2022 21:07:12 +0100 Subject: [PATCH 07/14] include user contact in user context object --- backend/src/graphql/directive/isAuthorized.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts index 8840810ea..2843225ae 100644 --- a/backend/src/graphql/directive/isAuthorized.ts +++ b/backend/src/graphql/directive/isAuthorized.ts @@ -31,7 +31,10 @@ const isAuthorized: AuthChecker = async ({ context }, rights) => { // TODO - load from database dynamically & admin - maybe encode this in the token to prevent many database requests // TODO this implementation is bullshit - two database queries cause our user identifiers are not aligned and vary between email, id and pubKey try { - const user = await User.findOneOrFail({ where: { gradidoID: decoded.gradidoID } }) + const user = await User.findOneOrFail({ + where: { gradidoID: decoded.gradidoID }, + relations: ['emailContact'], + }) context.user = user context.role = user.isAdmin ? ROLE_ADMIN : ROLE_USER } catch { From 9b97b6c40ec108bbc2d3129f2c8f736f2a0e5e90 Mon Sep 17 00:00:00 2001 From: joseji Date: Tue, 13 Dec 2022 21:16:57 +0100 Subject: [PATCH 08/14] removed text files regarding passphrase --- backend/src/config/mnemonic.english.txt | 2048 ----------------- .../mnemonic.uncompressed_buffer13116.txt | 1 - 2 files changed, 2049 deletions(-) delete mode 100644 backend/src/config/mnemonic.english.txt delete mode 100644 backend/src/config/mnemonic.uncompressed_buffer13116.txt diff --git a/backend/src/config/mnemonic.english.txt b/backend/src/config/mnemonic.english.txt deleted file mode 100644 index 942040ed5..000000000 --- a/backend/src/config/mnemonic.english.txt +++ /dev/null @@ -1,2048 +0,0 @@ -abandon -ability -able -about -above -absent -absorb -abstract -absurd -abuse -access -accident -account -accuse -achieve -acid -acoustic -acquire -across -act -action -actor -actress -actual -adapt -add -addict -address -adjust -admit -adult -advance -advice -aerobic -affair -afford -afraid -again -age -agent -agree -ahead -aim -air -airport -aisle -alarm -album -alcohol -alert -alien -all -alley -allow -almost -alone -alpha -already -also -alter -always -amateur -amazing -among -amount -amused -analyst -anchor -ancient -anger -angle -angry -animal -ankle -announce -annual -another -answer -antenna -antique -anxiety -any -apart -apology -appear -apple -approve -april -arch -arctic -area -arena -argue -arm -armed -armor -army -around -arrange -arrest -arrive -arrow -art -artefact -artist -artwork -ask -aspect -assault -asset -assist -assume -asthma -athlete -atom -attack -attend -attitude -attract -auction -audit -august -aunt -author -auto -autumn -average -avocado -avoid -awake -aware -away -awesome -awful -awkward -axis -baby -bachelor -bacon -badge -bag -balance -balcony -ball -bamboo -banana -banner -bar -barely -bargain -barrel -base -basic -basket -battle -beach -bean -beauty -because -become -beef -before -begin -behave -behind -believe -below -belt -bench -benefit -best -betray -better -between -beyond -bicycle -bid -bike -bind -biology -bird -birth -bitter -black -blade -blame -blanket -blast -bleak -bless -blind -blood -blossom -blouse -blue -blur -blush -board -boat -body -boil -bomb -bone -bonus -book -boost -border -boring -borrow -boss -bottom -bounce -box -boy -bracket -brain -brand -brass -brave -bread -breeze -brick -bridge -brief -bright -bring -brisk -broccoli -broken -bronze -broom -brother -brown -brush -bubble -buddy -budget -buffalo -build -bulb -bulk -bullet -bundle -bunker -burden -burger -burst -bus -business -busy -butter -buyer -buzz -cabbage -cabin -cable -cactus -cage -cake -call -calm -camera -camp -can -canal -cancel -candy -cannon -canoe -canvas -canyon -capable -capital -captain -car -carbon -card -cargo -carpet -carry -cart -case -cash -casino -castle -casual -cat -catalog -catch -category -cattle -caught -cause -caution -cave -ceiling -celery -cement -census -century -cereal -certain -chair -chalk -champion -change -chaos -chapter -charge -chase -chat -cheap -check -cheese -chef -cherry -chest -chicken -chief -child -chimney -choice -choose -chronic -chuckle -chunk -churn -cigar -cinnamon -circle -citizen -city -civil -claim -clap -clarify -claw -clay -clean -clerk -clever -click -client -cliff -climb -clinic -clip -clock -clog -close -cloth -cloud -clown -club -clump -cluster -clutch -coach -coast -coconut -code -coffee -coil -coin -collect -color -column -combine -come -comfort -comic -common -company -concert -conduct -confirm -congress -connect -consider -control -convince -cook -cool -copper -copy -coral -core -corn -correct -cost -cotton -couch -country -couple -course -cousin -cover -coyote -crack -cradle -craft -cram -crane -crash -crater -crawl -crazy -cream -credit -creek -crew -cricket -crime -crisp -critic -crop -cross -crouch -crowd -crucial -cruel -cruise -crumble -crunch -crush -cry -crystal -cube -culture -cup -cupboard -curious -current -curtain -curve -cushion -custom -cute -cycle -dad -damage -damp -dance -danger -daring -dash -daughter -dawn -day -deal -debate -debris -decade -december -decide -decline -decorate -decrease -deer -defense -define -defy -degree -delay -deliver -demand -demise -denial -dentist -deny -depart -depend -deposit -depth -deputy -derive -describe -desert -design -desk -despair -destroy -detail -detect -develop -device -devote -diagram -dial -diamond -diary -dice -diesel -diet -differ -digital -dignity -dilemma -dinner -dinosaur -direct -dirt -disagree -discover -disease -dish -dismiss -disorder -display -distance -divert -divide -divorce -dizzy -doctor -document -dog -doll -dolphin -domain -donate -donkey -donor -door -dose -double -dove -draft -dragon -drama -drastic -draw -dream -dress -drift -drill -drink -drip -drive -drop -drum -dry -duck -dumb -dune -during -dust -dutch -duty -dwarf -dynamic -eager -eagle -early -earn -earth -easily -east -easy -echo -ecology -economy -edge -edit -educate -effort -egg -eight -either -elbow -elder -electric -elegant -element -elephant -elevator -elite -else -embark -embody -embrace -emerge -emotion -employ -empower -empty -enable -enact -end -endless -endorse -enemy -energy -enforce -engage -engine -enhance -enjoy -enlist -enough -enrich -enroll -ensure -enter -entire -entry -envelope -episode -equal -equip -era -erase -erode -erosion -error -erupt -escape -essay -essence -estate -eternal -ethics -evidence -evil -evoke -evolve -exact -example -excess -exchange -excite -exclude -excuse -execute -exercise -exhaust -exhibit -exile -exist -exit -exotic -expand -expect -expire -explain -expose -express -extend -extra -eye -eyebrow -fabric -face -faculty -fade -faint -faith -fall -false -fame -family -famous -fan -fancy -fantasy -farm -fashion -fat -fatal -father -fatigue -fault -favorite -feature -february -federal -fee -feed -feel -female -fence -festival -fetch -fever -few -fiber -fiction -field -figure -file -film -filter -final -find -fine -finger -finish -fire -firm -first -fiscal -fish -fit -fitness -fix -flag -flame -flash -flat -flavor -flee -flight -flip -float -flock -floor -flower -fluid -flush -fly -foam -focus -fog -foil -fold -follow -food -foot -force -forest -forget -fork -fortune -forum -forward -fossil -foster -found -fox -fragile -frame -frequent -fresh -friend -fringe -frog -front -frost -frown -frozen -fruit -fuel -fun -funny -furnace -fury -future -gadget -gain -galaxy -gallery -game -gap -garage -garbage -garden -garlic -garment -gas -gasp -gate -gather -gauge -gaze -general -genius -genre -gentle -genuine -gesture -ghost -giant -gift -giggle -ginger -giraffe -girl -give -glad -glance -glare -glass -glide -glimpse -globe -gloom -glory -glove -glow -glue -goat -goddess -gold -good -goose -gorilla -gospel -gossip -govern -gown -grab -grace -grain -grant -grape -grass -gravity -great -green -grid -grief -grit -grocery -group -grow -grunt -guard -guess -guide -guilt -guitar -gun -gym -habit -hair -half -hammer -hamster -hand -happy -harbor -hard -harsh -harvest -hat -have -hawk -hazard -head -health -heart -heavy -hedgehog -height -hello -helmet -help -hen -hero -hidden -high -hill -hint -hip -hire -history -hobby -hockey -hold -hole -holiday -hollow -home -honey -hood -hope -horn -horror -horse -hospital -host -hotel -hour -hover -hub -huge -human -humble -humor -hundred -hungry -hunt -hurdle -hurry -hurt -husband -hybrid -ice -icon -idea -identify -idle -ignore -ill -illegal -illness -image -imitate -immense -immune -impact -impose -improve -impulse -inch -include -income -increase -index -indicate -indoor -industry -infant -inflict -inform -inhale -inherit -initial -inject -injury -inmate -inner -innocent -input -inquiry -insane -insect -inside -inspire -install -intact -interest -into -invest -invite -involve -iron -island -isolate -issue -item -ivory -jacket -jaguar -jar -jazz -jealous -jeans -jelly -jewel -job -join -joke -journey -joy -judge -juice -jump -jungle -junior -junk -just -kangaroo -keen -keep -ketchup -key -kick -kid -kidney -kind -kingdom -kiss -kit -kitchen -kite -kitten -kiwi -knee -knife -knock -know -lab -label -labor -ladder -lady -lake -lamp -language -laptop -large -later -latin -laugh -laundry -lava -law -lawn -lawsuit -layer -lazy -leader -leaf -learn -leave -lecture -left -leg -legal -legend -leisure -lemon -lend -length -lens -leopard -lesson -letter -level -liar -liberty -library -license -life -lift -light -like -limb -limit -link -lion -liquid -list -little -live -lizard -load -loan -lobster -local -lock -logic -lonely -long -loop -lottery -loud -lounge -love -loyal -lucky -luggage -lumber -lunar -lunch -luxury -lyrics -machine -mad -magic -magnet -maid -mail -main -major -make -mammal -man -manage -mandate -mango -mansion -manual -maple -marble -march -margin -marine -market -marriage -mask -mass -master -match -material -math -matrix -matter -maximum -maze -meadow -mean -measure -meat -mechanic -medal -media -melody -melt -member -memory -mention -menu -mercy -merge -merit -merry -mesh -message -metal -method -middle -midnight -milk -million -mimic -mind -minimum -minor -minute -miracle -mirror -misery -miss -mistake -mix -mixed -mixture -mobile -model -modify -mom -moment -monitor -monkey -monster -month -moon -moral -more -morning -mosquito -mother -motion -motor -mountain -mouse -move -movie -much -muffin -mule -multiply -muscle -museum -mushroom -music -must -mutual -myself -mystery -myth -naive -name -napkin -narrow -nasty -nation -nature -near -neck -need -negative -neglect -neither -nephew -nerve -nest -net -network -neutral -never -news -next -nice -night -noble -noise -nominee -noodle -normal -north -nose -notable -note -nothing -notice -novel -now -nuclear -number -nurse -nut -oak -obey -object -oblige -obscure -observe -obtain -obvious -occur -ocean -october -odor -off -offer -office -often -oil -okay -old -olive -olympic -omit -once -one -onion -online -only -open -opera -opinion -oppose -option -orange -orbit -orchard -order -ordinary -organ -orient -original -orphan -ostrich -other -outdoor -outer -output -outside -oval -oven -over -own -owner -oxygen -oyster -ozone -pact -paddle -page -pair -palace -palm -panda -panel -panic -panther -paper -parade -parent -park -parrot -party -pass -patch -path -patient -patrol -pattern -pause -pave -payment -peace -peanut -pear -peasant -pelican -pen -penalty -pencil -people -pepper -perfect -permit -person -pet -phone -photo -phrase -physical -piano -picnic -picture -piece -pig -pigeon -pill -pilot -pink -pioneer -pipe -pistol -pitch -pizza -place -planet -plastic -plate -play -please -pledge -pluck -plug -plunge -poem -poet -point -polar -pole -police -pond -pony -pool -popular -portion -position -possible -post -potato -pottery -poverty -powder -power -practice -praise -predict -prefer -prepare -present -pretty -prevent -price -pride -primary -print -priority -prison -private -prize -problem -process -produce -profit -program -project -promote -proof -property -prosper -protect -proud -provide -public -pudding -pull -pulp -pulse -pumpkin -punch -pupil -puppy -purchase -purity -purpose -purse -push -put -puzzle -pyramid -quality -quantum -quarter -question -quick -quit -quiz -quote -rabbit -raccoon -race -rack -radar -radio -rail -rain -raise -rally -ramp -ranch -random -range -rapid -rare -rate -rather -raven -raw -razor -ready -real -reason -rebel -rebuild -recall -receive -recipe -record -recycle -reduce -reflect -reform -refuse -region -regret -regular -reject -relax -release -relief -rely -remain -remember -remind -remove -render -renew -rent -reopen -repair -repeat -replace -report -require -rescue -resemble -resist -resource -response -result -retire -retreat -return -reunion -reveal -review -reward -rhythm -rib -ribbon -rice -rich -ride -ridge -rifle -right -rigid -ring -riot -ripple -risk -ritual -rival -river -road -roast -robot -robust -rocket -romance -roof -rookie -room -rose -rotate -rough -round -route -royal -rubber -rude -rug -rule -run -runway -rural -sad -saddle -sadness -safe -sail -salad -salmon -salon -salt -salute -same -sample -sand -satisfy -satoshi -sauce -sausage -save -say -scale -scan -scare -scatter -scene -scheme -school -science -scissors -scorpion -scout -scrap -screen -script -scrub -sea -search -season -seat -second -secret -section -security -seed -seek -segment -select -sell -seminar -senior -sense -sentence -series -service -session -settle -setup -seven -shadow -shaft -shallow -share -shed -shell -sheriff -shield -shift -shine -ship -shiver -shock -shoe -shoot -shop -short -shoulder -shove -shrimp -shrug -shuffle -shy -sibling -sick -side -siege -sight -sign -silent -silk -silly -silver -similar -simple -since -sing -siren -sister -situate -six -size -skate -sketch -ski -skill -skin -skirt -skull -slab -slam -sleep -slender -slice -slide -slight -slim -slogan -slot -slow -slush -small -smart -smile -smoke -smooth -snack -snake -snap -sniff -snow -soap -soccer -social -sock -soda -soft -solar -soldier -solid -solution -solve -someone -song -soon -sorry -sort -soul -sound -soup -source -south -space -spare -spatial -spawn -speak -special -speed -spell -spend -sphere -spice -spider -spike -spin -spirit -split -spoil -sponsor -spoon -sport -spot -spray -spread -spring -spy -square -squeeze -squirrel -stable -stadium -staff -stage -stairs -stamp -stand -start -state -stay -steak -steel -stem -step -stereo -stick -still -sting -stock -stomach -stone -stool -story -stove -strategy -street -strike -strong -struggle -student -stuff -stumble -style -subject -submit -subway -success -such -sudden -suffer -sugar -suggest -suit -summer -sun -sunny -sunset -super -supply -supreme -sure -surface -surge -surprise -surround -survey -suspect -sustain -swallow -swamp -swap -swarm -swear -sweet -swift -swim -swing -switch -sword -symbol -symptom -syrup -system -table -tackle -tag -tail -talent -talk -tank -tape -target -task -taste -tattoo -taxi -teach -team -tell -ten -tenant -tennis -tent -term -test -text -thank -that -theme -then -theory -there -they -thing -this -thought -three -thrive -throw -thumb -thunder -ticket -tide -tiger -tilt -timber -time -tiny -tip -tired -tissue -title -toast -tobacco -today -toddler -toe -together -toilet -token -tomato -tomorrow -tone -tongue -tonight -tool -tooth -top -topic -topple -torch -tornado -tortoise -toss -total -tourist -toward -tower -town -toy -track -trade -traffic -tragic -train -transfer -trap -trash -travel -tray -treat -tree -trend -trial -tribe -trick -trigger -trim -trip -trophy -trouble -truck -true -truly -trumpet -trust -truth -try -tube -tuition -tumble -tuna -tunnel -turkey -turn -turtle -twelve -twenty -twice -twin -twist -two -type -typical -ugly -umbrella -unable -unaware -uncle -uncover -under -undo -unfair -unfold -unhappy -uniform -unique -unit -universe -unknown -unlock -until -unusual -unveil -update -upgrade -uphold -upon -upper -upset -urban -urge -usage -use -used -useful -useless -usual -utility -vacant -vacuum -vague -valid -valley -valve -van -vanish -vapor -various -vast -vault -vehicle -velvet -vendor -venture -venue -verb -verify -version -very -vessel -veteran -viable -vibrant -vicious -victory -video -view -village -vintage -violin -virtual -virus -visa -visit -visual -vital -vivid -vocal -voice -void -volcano -volume -vote -voyage -wage -wagon -wait -walk -wall -walnut -want -warfare -warm -warrior -wash -wasp -waste -water -wave -way -wealth -weapon -wear -weasel -weather -web -wedding -weekend -weird -welcome -west -wet -whale -what -wheat -wheel -when -where -whip -whisper -wide -width -wife -wild -will -win -window -wine -wing -wink -winner -winter -wire -wisdom -wise -wish -witness -wolf -woman -wonder -wood -wool -word -work -world -worry -worth -wrap -wreck -wrestle -wrist -write -wrong -yard -year -yellow -you -young -youth -zebra -zero -zone -zoo diff --git a/backend/src/config/mnemonic.uncompressed_buffer13116.txt b/backend/src/config/mnemonic.uncompressed_buffer13116.txt deleted file mode 100644 index 8eceb1e2f..000000000 --- a/backend/src/config/mnemonic.uncompressed_buffer13116.txt +++ /dev/null @@ -1 +0,0 @@ -abandon,ability,able,about,above,absent,absorb,abstract,absurd,abuse,access,accident,account,accuse,achieve,acid,acoustic,acquire,across,act,action,actor,actress,actual,adapt,add,addict,address,adjust,admit,adult,advance,advice,aerobic,affair,afford,afraid,again,age,agent,agree,ahead,aim,air,airport,aisle,alarm,album,alcohol,alert,alien,all,alley,allow,almost,alone,alpha,already,also,alter,always,amateur,amazing,among,amount,amused,analyst,anchor,ancient,anger,angle,angry,animal,ankle,announce,annual,another,answer,antenna,antique,anxiety,any,apart,apology,appear,apple,approve,april,arch,arctic,area,arena,argue,arm,armed,armor,army,around,arrange,arrest,arrive,arrow,art,artefact,artist,artwork,ask,aspect,assault,asset,assist,assume,asthma,athlete,atom,attack,attend,attitude,attract,auction,audit,august,aunt,author,auto,autumn,average,avocado,avoid,awake,aware,away,awesome,awful,awkward,axis,baby,bachelor,bacon,badge,bag,balance,balcony,ball,bamboo,banana,banner,bar,barely,bargain,barrel,base,basic,basket,battle,beach,bean,beauty,because,become,beef,before,begin,behave,behind,believe,below,belt,bench,benefit,best,betray,better,between,beyond,bicycle,bid,bike,bind,biology,bird,birth,bitter,black,blade,blame,blanket,blast,bleak,bless,blind,blood,blossom,blouse,blue,blur,blush,board,boat,body,boil,bomb,bone,bonus,book,boost,border,boring,borrow,boss,bottom,bounce,box,boy,bracket,brain,brand,brass,brave,bread,breeze,brick,bridge,brief,bright,bring,brisk,broccoli,broken,bronze,broom,brother,brown,brush,bubble,buddy,budget,buffalo,build,bulb,bulk,bullet,bundle,bunker,burden,burger,burst,bus,business,busy,butter,buyer,buzz,cabbage,cabin,cable,cactus,cage,cake,call,calm,camera,camp,can,canal,cancel,candy,cannon,canoe,canvas,canyon,capable,capital,captain,car,carbon,card,cargo,carpet,carry,cart,case,cash,casino,castle,casual,cat,catalog,catch,category,cattle,caught,cause,caution,cave,ceiling,celery,cement,census,century,cereal,certain,chair,chalk,champion,change,chaos,chapter,charge,chase,chat,cheap,check,cheese,chef,cherry,chest,chicken,chief,child,chimney,choice,choose,chronic,chuckle,chunk,churn,cigar,cinnamon,circle,citizen,city,civil,claim,clap,clarify,claw,clay,clean,clerk,clever,click,client,cliff,climb,clinic,clip,clock,clog,close,cloth,cloud,clown,club,clump,cluster,clutch,coach,coast,coconut,code,coffee,coil,coin,collect,color,column,combine,come,comfort,comic,common,company,concert,conduct,confirm,congress,connect,consider,control,convince,cook,cool,copper,copy,coral,core,corn,correct,cost,cotton,couch,country,couple,course,cousin,cover,coyote,crack,cradle,craft,cram,crane,crash,crater,crawl,crazy,cream,credit,creek,crew,cricket,crime,crisp,critic,crop,cross,crouch,crowd,crucial,cruel,cruise,crumble,crunch,crush,cry,crystal,cube,culture,cup,cupboard,curious,current,curtain,curve,cushion,custom,cute,cycle,dad,damage,damp,dance,danger,daring,dash,daughter,dawn,day,deal,debate,debris,decade,december,decide,decline,decorate,decrease,deer,defense,define,defy,degree,delay,deliver,demand,demise,denial,dentist,deny,depart,depend,deposit,depth,deputy,derive,describe,desert,design,desk,despair,destroy,detail,detect,develop,device,devote,diagram,dial,diamond,diary,dice,diesel,diet,differ,digital,dignity,dilemma,dinner,dinosaur,direct,dirt,disagree,discover,disease,dish,dismiss,disorder,display,distance,divert,divide,divorce,dizzy,doctor,document,dog,doll,dolphin,domain,donate,donkey,donor,door,dose,double,dove,draft,dragon,drama,drastic,draw,dream,dress,drift,drill,drink,drip,drive,drop,drum,dry,duck,dumb,dune,during,dust,dutch,duty,dwarf,dynamic,eager,eagle,early,earn,earth,easily,east,easy,echo,ecology,economy,edge,edit,educate,effort,egg,eight,either,elbow,elder,electric,elegant,element,elephant,elevator,elite,else,embark,embody,embrace,emerge,emotion,employ,empower,empty,enable,enact,end,endless,endorse,enemy,energy,enforce,engage,engine,enhance,enjoy,enlist,enough,enrich,enroll,ensure,enter,entire,entry,envelope,episode,equal,equip,era,erase,erode,erosion,error,erupt,escape,essay,essence,estate,eternal,ethics,evidence,evil,evoke,evolve,exact,example,excess,exchange,excite,exclude,excuse,execute,exercise,exhaust,exhibit,exile,exist,exit,exotic,expand,expect,expire,explain,expose,express,extend,extra,eye,eyebrow,fabric,face,faculty,fade,faint,faith,fall,false,fame,family,famous,fan,fancy,fantasy,farm,fashion,fat,fatal,father,fatigue,fault,favorite,feature,february,federal,fee,feed,feel,female,fence,festival,fetch,fever,few,fiber,fiction,field,figure,file,film,filter,final,find,fine,finger,finish,fire,firm,first,fiscal,fish,fit,fitness,fix,flag,flame,flash,flat,flavor,flee,flight,flip,float,flock,floor,flower,fluid,flush,fly,foam,focus,fog,foil,fold,follow,food,foot,force,forest,forget,fork,fortune,forum,forward,fossil,foster,found,fox,fragile,frame,frequent,fresh,friend,fringe,frog,front,frost,frown,frozen,fruit,fuel,fun,funny,furnace,fury,future,gadget,gain,galaxy,gallery,game,gap,garage,garbage,garden,garlic,garment,gas,gasp,gate,gather,gauge,gaze,general,genius,genre,gentle,genuine,gesture,ghost,giant,gift,giggle,ginger,giraffe,girl,give,glad,glance,glare,glass,glide,glimpse,globe,gloom,glory,glove,glow,glue,goat,goddess,gold,good,goose,gorilla,gospel,gossip,govern,gown,grab,grace,grain,grant,grape,grass,gravity,great,green,grid,grief,grit,grocery,group,grow,grunt,guard,guess,guide,guilt,guitar,gun,gym,habit,hair,half,hammer,hamster,hand,happy,harbor,hard,harsh,harvest,hat,have,hawk,hazard,head,health,heart,heavy,hedgehog,height,hello,helmet,help,hen,hero,hidden,high,hill,hint,hip,hire,history,hobby,hockey,hold,hole,holiday,hollow,home,honey,hood,hope,horn,horror,horse,hospital,host,hotel,hour,hover,hub,huge,human,humble,humor,hundred,hungry,hunt,hurdle,hurry,hurt,husband,hybrid,ice,icon,idea,identify,idle,ignore,ill,illegal,illness,image,imitate,immense,immune,impact,impose,improve,impulse,inch,include,income,increase,index,indicate,indoor,industry,infant,inflict,inform,inhale,inherit,initial,inject,injury,inmate,inner,innocent,input,inquiry,insane,insect,inside,inspire,install,intact,interest,into,invest,invite,involve,iron,island,isolate,issue,item,ivory,jacket,jaguar,jar,jazz,jealous,jeans,jelly,jewel,job,join,joke,journey,joy,judge,juice,jump,jungle,junior,junk,just,kangaroo,keen,keep,ketchup,key,kick,kid,kidney,kind,kingdom,kiss,kit,kitchen,kite,kitten,kiwi,knee,knife,knock,know,lab,label,labor,ladder,lady,lake,lamp,language,laptop,large,later,latin,laugh,laundry,lava,law,lawn,lawsuit,layer,lazy,leader,leaf,learn,leave,lecture,left,leg,legal,legend,leisure,lemon,lend,length,lens,leopard,lesson,letter,level,liar,liberty,library,license,life,lift,light,like,limb,limit,link,lion,liquid,list,little,live,lizard,load,loan,lobster,local,lock,logic,lonely,long,loop,lottery,loud,lounge,love,loyal,lucky,luggage,lumber,lunar,lunch,luxury,lyrics,machine,mad,magic,magnet,maid,mail,main,major,make,mammal,man,manage,mandate,mango,mansion,manual,maple,marble,march,margin,marine,market,marriage,mask,mass,master,match,material,math,matrix,matter,maximum,maze,meadow,mean,measure,meat,mechanic,medal,media,melody,melt,member,memory,mention,menu,mercy,merge,merit,merry,mesh,message,metal,method,middle,midnight,milk,million,mimic,mind,minimum,minor,minute,miracle,mirror,misery,miss,mistake,mix,mixed,mixture,mobile,model,modify,mom,moment,monitor,monkey,monster,month,moon,moral,more,morning,mosquito,mother,motion,motor,mountain,mouse,move,movie,much,muffin,mule,multiply,muscle,museum,mushroom,music,must,mutual,myself,mystery,myth,naive,name,napkin,narrow,nasty,nation,nature,near,neck,need,negative,neglect,neither,nephew,nerve,nest,net,network,neutral,never,news,next,nice,night,noble,noise,nominee,noodle,normal,north,nose,notable,note,nothing,notice,novel,now,nuclear,number,nurse,nut,oak,obey,object,oblige,obscure,observe,obtain,obvious,occur,ocean,october,odor,off,offer,office,often,oil,okay,old,olive,olympic,omit,once,one,onion,online,only,open,opera,opinion,oppose,option,orange,orbit,orchard,order,ordinary,organ,orient,original,orphan,ostrich,other,outdoor,outer,output,outside,oval,oven,over,own,owner,oxygen,oyster,ozone,pact,paddle,page,pair,palace,palm,panda,panel,panic,panther,paper,parade,parent,park,parrot,party,pass,patch,path,patient,patrol,pattern,pause,pave,payment,peace,peanut,pear,peasant,pelican,pen,penalty,pencil,people,pepper,perfect,permit,person,pet,phone,photo,phrase,physical,piano,picnic,picture,piece,pig,pigeon,pill,pilot,pink,pioneer,pipe,pistol,pitch,pizza,place,planet,plastic,plate,play,please,pledge,pluck,plug,plunge,poem,poet,point,polar,pole,police,pond,pony,pool,popular,portion,position,possible,post,potato,pottery,poverty,powder,power,practice,praise,predict,prefer,prepare,present,pretty,prevent,price,pride,primary,print,priority,prison,private,prize,problem,process,produce,profit,program,project,promote,proof,property,prosper,protect,proud,provide,public,pudding,pull,pulp,pulse,pumpkin,punch,pupil,puppy,purchase,purity,purpose,purse,push,put,puzzle,pyramid,quality,quantum,quarter,question,quick,quit,quiz,quote,rabbit,raccoon,race,rack,radar,radio,rail,rain,raise,rally,ramp,ranch,random,range,rapid,rare,rate,rather,raven,raw,razor,ready,real,reason,rebel,rebuild,recall,receive,recipe,record,recycle,reduce,reflect,reform,refuse,region,regret,regular,reject,relax,release,relief,rely,remain,remember,remind,remove,render,renew,rent,reopen,repair,repeat,replace,report,require,rescue,resemble,resist,resource,response,result,retire,retreat,return,reunion,reveal,review,reward,rhythm,rib,ribbon,rice,rich,ride,ridge,rifle,right,rigid,ring,riot,ripple,risk,ritual,rival,river,road,roast,robot,robust,rocket,romance,roof,rookie,room,rose,rotate,rough,round,route,royal,rubber,rude,rug,rule,run,runway,rural,sad,saddle,sadness,safe,sail,salad,salmon,salon,salt,salute,same,sample,sand,satisfy,satoshi,sauce,sausage,save,say,scale,scan,scare,scatter,scene,scheme,school,science,scissors,scorpion,scout,scrap,screen,script,scrub,sea,search,season,seat,second,secret,section,security,seed,seek,segment,select,sell,seminar,senior,sense,sentence,series,service,session,settle,setup,seven,shadow,shaft,shallow,share,shed,shell,sheriff,shield,shift,shine,ship,shiver,shock,shoe,shoot,shop,short,shoulder,shove,shrimp,shrug,shuffle,shy,sibling,sick,side,siege,sight,sign,silent,silk,silly,silver,similar,simple,since,sing,siren,sister,situate,six,size,skate,sketch,ski,skill,skin,skirt,skull,slab,slam,sleep,slender,slice,slide,slight,slim,slogan,slot,slow,slush,small,smart,smile,smoke,smooth,snack,snake,snap,sniff,snow,soap,soccer,social,sock,soda,soft,solar,soldier,solid,solution,solve,someone,song,soon,sorry,sort,soul,sound,soup,source,south,space,spare,spatial,spawn,speak,special,speed,spell,spend,sphere,spice,spider,spike,spin,spirit,split,spoil,sponsor,spoon,sport,spot,spray,spread,spring,spy,square,squeeze,squirrel,stable,stadium,staff,stage,stairs,stamp,stand,start,state,stay,steak,steel,stem,step,stereo,stick,still,sting,stock,stomach,stone,stool,story,stove,strategy,street,strike,strong,struggle,student,stuff,stumble,style,subject,submit,subway,success,such,sudden,suffer,sugar,suggest,suit,summer,sun,sunny,sunset,super,supply,supreme,sure,surface,surge,surprise,surround,survey,suspect,sustain,swallow,swamp,swap,swarm,swear,sweet,swift,swim,swing,switch,sword,symbol,symptom,syrup,system,table,tackle,tag,tail,talent,talk,tank,tape,target,task,taste,tattoo,taxi,teach,team,tell,ten,tenant,tennis,tent,term,test,text,thank,that,theme,then,theory,there,they,thing,this,thought,three,thrive,throw,thumb,thunder,ticket,tide,tiger,tilt,timber,time,tiny,tip,tired,tissue,title,toast,tobacco,today,toddler,toe,together,toilet,token,tomato,tomorrow,tone,tongue,tonight,tool,tooth,top,topic,topple,torch,tornado,tortoise,toss,total,tourist,toward,tower,town,toy,track,trade,traffic,tragic,train,transfer,trap,trash,travel,tray,treat,tree,trend,trial,tribe,trick,trigger,trim,trip,trophy,trouble,truck,true,truly,trumpet,trust,truth,try,tube,tuition,tumble,tuna,tunnel,turkey,turn,turtle,twelve,twenty,twice,twin,twist,two,type,typical,ugly,umbrella,unable,unaware,uncle,uncover,under,undo,unfair,unfold,unhappy,uniform,unique,unit,universe,unknown,unlock,until,unusual,unveil,update,upgrade,uphold,upon,upper,upset,urban,urge,usage,use,used,useful,useless,usual,utility,vacant,vacuum,vague,valid,valley,valve,van,vanish,vapor,various,vast,vault,vehicle,velvet,vendor,venture,venue,verb,verify,version,very,vessel,veteran,viable,vibrant,vicious,victory,video,view,village,vintage,violin,virtual,virus,visa,visit,visual,vital,vivid,vocal,voice,void,volcano,volume,vote,voyage,wage,wagon,wait,walk,wall,walnut,want,warfare,warm,warrior,wash,wasp,waste,water,wave,way,wealth,weapon,wear,weasel,weather,web,wedding,weekend,weird,welcome,west,wet,whale,what,wheat,wheel,when,where,whip,whisper,wide,width,wife,wild,will,win,window,wine,wing,wink,winner,winter,wire,wisdom,wise,wish,witness,wolf,woman,wonder,wood,wool,word,work,world,worry,worth,wrap,wreck,wrestle,wrist,write,wrong,yard,year,yellow,you,young,youth,zebra,zero,zone,zoo, \ No newline at end of file From 0bcd44183741d727d7a1c16fcf7aee705e8f3737 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 13 Dec 2022 21:26:32 +0100 Subject: [PATCH 09/14] rename migrations and entity number --- .../User.ts | 0 .../UserContact.ts | 0 database/entity/User.ts | 2 +- database/entity/UserContact.ts | 2 +- ...ear_old_password_junk.ts => 0056-clear_old_password_junk.ts} | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename database/entity/{0057-clear_old_password_junk => 0056-clear_old_password_junk}/User.ts (100%) rename database/entity/{0057-clear_old_password_junk => 0056-clear_old_password_junk}/UserContact.ts (100%) rename database/migrations/{0057-clear_old_password_junk.ts => 0056-clear_old_password_junk.ts} (100%) diff --git a/database/entity/0057-clear_old_password_junk/User.ts b/database/entity/0056-clear_old_password_junk/User.ts similarity index 100% rename from database/entity/0057-clear_old_password_junk/User.ts rename to database/entity/0056-clear_old_password_junk/User.ts diff --git a/database/entity/0057-clear_old_password_junk/UserContact.ts b/database/entity/0056-clear_old_password_junk/UserContact.ts similarity index 100% rename from database/entity/0057-clear_old_password_junk/UserContact.ts rename to database/entity/0056-clear_old_password_junk/UserContact.ts diff --git a/database/entity/User.ts b/database/entity/User.ts index 5cffc688e..aa5c5fa5b 100644 --- a/database/entity/User.ts +++ b/database/entity/User.ts @@ -1 +1 @@ -export { User } from './0057-clear_old_password_junk/User' +export { User } from './0056-clear_old_password_junk/User' diff --git a/database/entity/UserContact.ts b/database/entity/UserContact.ts index 17d4575b0..1787ff011 100644 --- a/database/entity/UserContact.ts +++ b/database/entity/UserContact.ts @@ -1 +1 @@ -export { UserContact } from './0057-clear_old_password_junk/UserContact' +export { UserContact } from './0056-clear_old_password_junk/UserContact' diff --git a/database/migrations/0057-clear_old_password_junk.ts b/database/migrations/0056-clear_old_password_junk.ts similarity index 100% rename from database/migrations/0057-clear_old_password_junk.ts rename to database/migrations/0056-clear_old_password_junk.ts From 1229a7f7df0df446209a6170c8a98a5fab65cce7 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 13 Dec 2022 22:14:06 +0100 Subject: [PATCH 10/14] change database version --- backend/src/config/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index 38a4fde05..f28dc394d 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -10,7 +10,7 @@ Decimal.set({ }) const constants = { - DB_VERSION: '0057-clear_old_password_junk', + DB_VERSION: '0056-clear_old_password_junk', DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0 LOG4JS_CONFIG: 'log4js-config.json', // default log level on production should be info From 798051f360b650340e395b869309f49b2f1bd190 Mon Sep 17 00:00:00 2001 From: joseji Date: Wed, 14 Dec 2022 00:10:45 +0100 Subject: [PATCH 11/14] docker error solved --- backend/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index c09e5aaf8..945f92ac1 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -108,8 +108,7 @@ COPY --from=build ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig.json # Copy log4js-config.json to provide log configuration COPY --from=build ${DOCKER_WORKDIR}/log4js-config.json ./log4js-config.json # Copy memonic type since its referenced in the sources -# TODO: remove -COPY --from=build ${DOCKER_WORKDIR}/src/config/mnemonic.uncompressed_buffer13116.txt ./src/config/mnemonic.uncompressed_buffer13116.txt + # Copy run scripts run/ # COPY --from=build ${DOCKER_WORKDIR}/run ./run From 00a7ac4eb5d5f89555301caf51f33f5c6ff76c29 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 15 Dec 2022 11:18:31 +0100 Subject: [PATCH 12/14] deleted old comment --- backend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 945f92ac1..910bdd504 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -107,7 +107,6 @@ COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json COPY --from=build ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig.json # Copy log4js-config.json to provide log configuration COPY --from=build ${DOCKER_WORKDIR}/log4js-config.json ./log4js-config.json -# Copy memonic type since its referenced in the sources # Copy run scripts run/ # COPY --from=build ${DOCKER_WORKDIR}/run ./run From 873076ebfca6bd87ed855cadb0353c811c9aff2c Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 15 Dec 2022 13:02:19 +0100 Subject: [PATCH 13/14] remove unused import --- backend/src/graphql/resolver/TransactionResolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index c8dd27b3e..350db0986 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -21,7 +21,7 @@ import Paginated from '@arg/Paginated' import { backendLogger as logger } from '@/server/logger' import { Context, getUser } from '@/server/context' -import { calculateBalance, isHexPublicKey } from '@/util/validate' +import { calculateBalance } from '@/util/validate' import { RIGHTS } from '@/auth/RIGHTS' import { communityUser } from '@/util/communityUser' import { virtualLinkTransaction, virtualDecayTransaction } from '@/util/virtualTransactions' From ce0e306284f117c2e2d963098aa4fc96a7889dbe Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 15 Dec 2022 13:03:23 +0100 Subject: [PATCH 14/14] remove unused import --- backend/src/graphql/resolver/UserResolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 11c95c9d3..63191b6b7 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -60,7 +60,7 @@ import { } from '@/event/Event' import { getUserCreation, getUserCreations } from './util/creations' import { FULL_CREATION_AVAILABLE } from './const/const' -import { isValidPassword, SecretKeyCryptographyCreateKey } from '@/password/EncryptorUtils' +import { isValidPassword } from '@/password/EncryptorUtils' import { encryptPassword, verifyPassword } from '@/password/PasswordEncryptor' import { PasswordEncryptionType } from '../enum/PasswordEncryptionType'