rm commented code

This commit is contained in:
Tobias Bengfort
2021-06-17 10:21:04 +02:00
parent 007872bd8a
commit d54cd20d9b
8 changed files with 1 additions and 15 deletions

View File

@@ -5,7 +5,6 @@ import datetime, random
from random import randint from random import randint
from .models import * from .models import *
# from django.template.context import RequestContext
from .views import login from .views import login
from .Common import send from .Common import send

View File

@@ -7,7 +7,6 @@ from django.template.context_processors import csrf
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render from django.shortcuts import render
# from django.template.context import RequestContext
import simplejson import simplejson
from fido2 import cbor from fido2 import cbor
from django.http import HttpResponse from django.http import HttpResponse

View File

@@ -87,9 +87,6 @@ def add(request):
tk.properties["user_agent"] = ua tk.properties["user_agent"] = ua
tk.save() tk.save()
context["success"] = True context["success"] = True
# tk.properties["user_agent"]=ua
# tk.save()
# context["success"]=True
else: else:
context[ context[

View File

@@ -10,7 +10,6 @@ from cryptography.hazmat.primitives.serialization import Encoding
from django.shortcuts import render from django.shortcuts import render
import simplejson import simplejson
# from django.template.context import RequestContext
from django.template.context_processors import csrf from django.template.context_processors import csrf
from django.conf import settings from django.conf import settings
from django.http import HttpResponse from django.http import HttpResponse

View File

@@ -3,10 +3,6 @@ from jsonfield import JSONField
from jose import jwt from jose import jwt
from django.conf import settings from django.conf import settings
# from jsonLookup import shasLookup, hasLookup
# JSONField.register_lookup(shasLookup)
# JSONField.register_lookup(hasLookup)
class User_Keys(models.Model): class User_Keys(models.Model):
username = models.CharField(max_length=50) username = models.CharField(max_length=50)

View File

@@ -91,7 +91,6 @@ def verify(request):
uk = User_Keys() uk = User_Keys()
uk.username = request.user.username uk.username = request.user.username
uk.properties = {"secret_key": secret_key} uk.properties = {"secret_key": secret_key}
# uk.name="Authenticatior #%s"%User_Keys.objects.filter(username=user.username,type="TOTP")
uk.key_type = "TOTP" uk.key_type = "TOTP"
uk.save() uk.save()
return HttpResponse("Success") return HttpResponse("Success")

View File

@@ -1,11 +1,10 @@
from . import views, totp, U2F, TrustedDevice, helpers, FIDO2, Email from . import views, totp, U2F, TrustedDevice, helpers, FIDO2, Email
# app_name='mfa'
try: try:
from django.urls import re_path as url from django.urls import re_path as url
except: except:
from django.conf.urls import url from django.conf.urls import url
urlpatterns = [ urlpatterns = [
url(r"totp/start/", totp.start, name="start_new_otop"), url(r"totp/start/", totp.start, name="start_new_otop"),
url(r"totp/getToken", totp.getToken, name="get_new_otop"), url(r"totp/getToken", totp.getToken, name="get_new_otop"),
@@ -43,4 +42,3 @@ urlpatterns = [
url(r"delete", views.delKey, name="mfa_delKey"), url(r"delete", views.delKey, name="mfa_delKey"),
url(r"reset", views.reset_cookie, name="mfa_reset_cookie"), url(r"reset", views.reset_cookie, name="mfa_reset_cookie"),
] ]
# print(urlpatterns)

View File

@@ -34,7 +34,6 @@ def index(request):
def verify(request, username): def verify(request, username):
request.session["base_username"] = username request.session["base_username"] = username
# request.session["base_password"] = password
keys = User_Keys.objects.filter(username=username, enabled=1) keys = User_Keys.objects.filter(username=username, enabled=1)
methods = list(set([k.key_type for k in keys])) methods = list(set([k.key_type for k in keys]))