From 2166c058f34dff6f91566930d12448805d829de7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Oct 2022 14:23:42 +0200 Subject: Allow admins to disable two factor auth --- server/helpers/peertube-crypto.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/helpers/peertube-crypto.ts') diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 8aca50900..dcf47ce76 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts @@ -24,6 +24,8 @@ function createPrivateAndPublicKeys () { // User password checks function comparePassword (plainPassword: string, hashPassword: string) { + if (!plainPassword) return Promise.resolve(false) + return bcryptComparePromise(plainPassword, hashPassword) } -- cgit v1.2.3