From f32460b667924cf487ce6fccef0e1e1f4901a18f Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Mon, 5 Oct 2020 13:01:37 +0200 Subject: [PATCH] a bit of documentation on the recovery code model --- uffd/mfa/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uffd/mfa/models.py b/uffd/mfa/models.py index fd8870ff..fccae0e8 100644 --- a/uffd/mfa/models.py +++ b/uffd/mfa/models.py @@ -57,6 +57,8 @@ class RecoveryCodeMethod(MFAMethod): def __init__(self, user): super().__init__(user, None) + # The code attribute is only available in newly created objects as only + # it's hash is stored in the database self.code = secrets.token_hex(8).replace(' ', '').lower() self.code_hash = crypt.crypt(self.code) -- GitLab