Parcourir la source

fix: Make authentication check mandatory even in case of 2FA

version-14
leela il y a 4 ans
Parent
révision
2227b910d3
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. +1
    -3
      frappe/auth.py

+ 1
- 3
frappe/auth.py Voir le fichier

@@ -215,9 +215,7 @@ class LoginManager:
if not (user and pwd): if not (user and pwd):
self.fail(_('Incomplete login details'), user=user) self.fail(_('Incomplete login details'), user=user)


# Ignore password check if tmp_id is set, 2FA takes care of authentication.
validate_password = not bool(frappe.form_dict.get('tmp_id'))
user = User.find_by_credentials(user, pwd, validate_password=validate_password)
user = User.find_by_credentials(user, pwd)


if not user: if not user:
self.fail('Invalid login credentials') self.fail('Invalid login credentials')


Chargement…
Annuler
Enregistrer