From 9fc8fdd9d12e44a26461205d7ff3e7ed3ef36d10 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Mon, 20 Sep 2021 22:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpushplus=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/auth.ts | 6 +++++- src/utils/config.ts | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/back/services/auth.ts b/back/services/auth.ts index c0c47594..34ee091c 100644 --- a/back/services/auth.ts +++ b/back/services/auth.ts @@ -40,7 +40,7 @@ export default class AuthService { const content = this.getAuthInfo(); const timestamp = Date.now(); if (content) { - const { + let { username: cUsername, password: cPassword, retries = 0, @@ -48,7 +48,10 @@ export default class AuthService { lastip, lastaddr, twoFactorActivated, + twoFactorActived, } = content; + // patch old field + twoFactorActivated = twoFactorActivated || twoFactorActived; if ( (cUsername === 'admin' && cPassword === 'admin') || @@ -237,6 +240,7 @@ export default class AuthService { const authInfo = this.getAuthInfo(); this.updateAuthInfo(authInfo, { twoFactorActivated: false, + twoFactorActived: false, twoFactorSecret: '', }); return true; diff --git a/src/utils/config.ts b/src/utils/config.ts index 7060ae79..f7886b63 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -162,7 +162,6 @@ export default { { label: 'pushPlusUser', tip: '一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)', - required: true, }, ], email: [