]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/peertube-crypto.ts
Allow admins to disable two factor auth
[github/Chocobozzz/PeerTube.git] / server / helpers / peertube-crypto.ts
index 8aca509009bb1649aefce6fe7abdc9046e67a9a2..dcf47ce761efb5752cb2af92c0fb7283a9a62cf4 100644 (file)
@@ -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)
 }