- Fix refactor damage
This commit is contained in:
dschom 2024-01-17 09:57:19 -08:00
Родитель a33a0b5a41
Коммит 0538589f63
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F26AEE99174EE68B
5 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -33,12 +33,12 @@ CREATE PROCEDURE `createAccount_10`(
IN `inEmailVerified` TINYINT(1),
IN `inKA` BINARY(32),
IN `inWrapWrapKb` BINARY(32),
IN `inwrapWrapKbVersion2` BINARY(32),
IN `inWrapWrapKbVersion2` BINARY(32),
IN `inAuthSalt` BINARY(32),
IN `inClientSalt` VARCHAR(128),
IN `inVerifierVersion` TINYINT UNSIGNED,
IN `inVerifyHash` BINARY(32),
IN `inverifyHashVersion2` BINARY(32),
IN `inVerifyHashVersion2` BINARY(32),
IN `inVerifierSetAt` BIGINT UNSIGNED,
IN `inCreatedAt` BIGINT UNSIGNED,
IN `inLocale` VARCHAR(255)
@ -86,12 +86,12 @@ BEGIN
inEmailVerified,
inKA,
inWrapWrapKb,
inwrapWrapKbVersion2,
inWrapWrapKbVersion2,
inAuthSalt,
inClientSalt,
inVerifierVersion,
inVerifyHash,
inverifyHashVersion2,
inVerifyHashVersion2,
inVerifierSetAt,
inCreatedAt,
inLocale

Просмотреть файл

@ -20,7 +20,7 @@ const DESCRIPTIONS = {
authAt:
'The UTC unix timestamp for the session at which the user last authenticated to FxA server when generating this token, in seconds since the epoch.',
authPW: 'The PBKDF2/HKDF-stretched password as a hex string.',
authPW2:
authPWVersion2:
'The PBKDF2/HKDF-stretched password as a hex string using the version 2 key stretching.',
billingAgreementId: 'A unique identifier for the PayPal billing agreement.',
billingName: 'Full name',
@ -270,7 +270,7 @@ const DESCRIPTIONS = {
verificationReason:
'The authentication method that required additional verification.',
wrapKb: 'The new `wrapKb` value as a hex string.',
wrapKb2: 'The new `wrapKb` value for authPW2 as a hex string.',
wrapKbVersion2: 'The new `wrapKb` value for authPW2 as a hex string.',
};
export default DESCRIPTIONS;

Просмотреть файл

@ -194,7 +194,7 @@ export class AccountHandler {
emailVerified: preVerified,
kA,
wrapWrapKb,
wrapWrapKbVersion2ersion2,
wrapWrapKbVersion2,
accountResetToken: null,
passwordForgotToken: null,
authSalt: authSalt,
@ -626,7 +626,7 @@ export class AccountHandler {
authSalt,
verifierVersion: this.config.verifierVersion,
verifyHash: Buffer.alloc(32).toString('hex'),
verifyHashVersion2ersion2: null,
verifyHashVersion2: null,
verifierSetAt: 0,
locale: request.app.acceptLanguage,
clientSalt: null,
@ -693,7 +693,7 @@ export class AccountHandler {
this.config.verifierVersion,
2
);
verifyHashVersion2ersion2 = await password2.verifyHash();
verifyHashVersion2 = await password2.verifyHash();
// In V2 we will supply wrapKb and wrapKbVersion2 and run sanity checks here.
// If wrapWrapKb drifts from what the client expects, it means we will
@ -1443,7 +1443,7 @@ export class AccountHandler {
keyFetchToken: any,
keyFetchToken2: any,
verifyHash: any,
verifyHashVersion2ersion2: any,
verifyHashVersion2: any,
wrapWrapKb: any,
wrapWrapKbVersion2: any,
password: any,

Просмотреть файл

@ -205,9 +205,6 @@ export class Account extends BaseAuthModel {
> & {
keysHaveChanged?: boolean;
}) {
console.log('!!! Account.reset', {v2: !!verifyHashVersion2 || !!wrapWrapKbVersion2})
return Account.callProcedure(
Proc.ResetAccount,
uuidTransformer.to(uid),

Просмотреть файл

@ -18,6 +18,9 @@ CREATE TABLE `accounts` (
`ecosystemAnonId` text CHARACTER SET ascii COLLATE ascii_bin,
`disabledAt` bigint(20) unsigned DEFAULT NULL,
`metricsOptOutAt` bigint(20) unsigned DEFAULT NULL,
`verifyHashVersion2` binary(32),
`wrapWrapKbVersion2` binary(32),
`clientSalt` varchar(128),
PRIMARY KEY (`uid`),
UNIQUE KEY `normalizedEmail` (`normalizedEmail`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;