diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-07 14:23:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-10-07 14:28:35 +0200 |
commit | 2166c058f34dff6f91566930d12448805d829de7 (patch) | |
tree | 2b9100b8eccbac287d1105c765901f966a354986 /server/helpers | |
parent | d12b40fb96d56786a96c06a621f3d8e0a0d24f4a (diff) | |
download | PeerTube-2166c058f34dff6f91566930d12448805d829de7.tar.gz PeerTube-2166c058f34dff6f91566930d12448805d829de7.tar.zst PeerTube-2166c058f34dff6f91566930d12448805d829de7.zip |
Allow admins to disable two factor auth
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/peertube-crypto.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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 () { | |||
24 | // User password checks | 24 | // User password checks |
25 | 25 | ||
26 | function comparePassword (plainPassword: string, hashPassword: string) { | 26 | function comparePassword (plainPassword: string, hashPassword: string) { |
27 | if (!plainPassword) return Promise.resolve(false) | ||
28 | |||
27 | return bcryptComparePromise(plainPassword, hashPassword) | 29 | return bcryptComparePromise(plainPassword, hashPassword) |
28 | } | 30 | } |
29 | 31 | ||