From 7bd97e13b008b4a3b265f44fc96c2cf8907b3b2a Mon Sep 17 00:00:00 2001 From: devStorm <59678453+developStorm@users.noreply.github.com> Date: Mon, 18 May 2020 13:55:38 -0700 Subject: [PATCH] fido_model -> fidos --- app/auth/views/fido.py | 10 +++++----- app/dashboard/views/fido_setup.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/auth/views/fido.py b/app/auth/views/fido.py index 05201d43..71c1f429 100644 --- a/app/auth/views/fido.py +++ b/app/auth/views/fido.py @@ -94,18 +94,18 @@ def fido(): session["fido_challenge"] = challenge.rstrip("=") - fido_model = Fido.filter_by(uuid=user.fido_uuid).all() + fidos = Fido.filter_by(uuid=user.fido_uuid).all() webauthn_users = [] - for record in fido_model: + for fido in fidos: webauthn_users.append( webauthn.WebAuthnUser( user.fido_uuid, user.email, user.name if user.name else user.email, False, - record.credential_id, - record.public_key, - record.sign_count, + fido.credential_id, + fido.public_key, + fido.sign_count, RP_ID, ) ) diff --git a/app/dashboard/views/fido_setup.py b/app/dashboard/views/fido_setup.py index 8e43726c..5f7283b2 100644 --- a/app/dashboard/views/fido_setup.py +++ b/app/dashboard/views/fido_setup.py @@ -34,9 +34,9 @@ def fido_setup(): return redirect(url_for("dashboard.index")) if current_user.fido_uuid is not None: - fido_model = Fido.filter_by(uuid=current_user.fido_uuid).all() + fidos = Fido.filter_by(uuid=current_user.fido_uuid).all() else: - fido_model = [] + fidos = [] fido_token_form = FidoTokenForm() @@ -113,11 +113,11 @@ def fido_setup(): del registration_dict["extensions"]["webauthn.loc"] # Prevent user from adding duplicated keys - for record in fido_model: + for fido in fidos: registration_dict["excludeCredentials"].append( { "type": "public-key", - "id": record.credential_id, + "id": fido.credential_id, "transports": ["usb", "nfc", "ble", "internal"], } )