File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11# Change Log
2+ ## 2.5.1
3+ * Fix: CVE-2022 -42731: related to possibility of registration replay attack thanks to 'SSE (Secure Systems Engineering)'
4+
25## 2.5.0
36
47 * Fixed: issue in the 'Authorize' button don't show on Firefox and Chrome on iOS.
Original file line number Diff line number Diff line change 1616import datetime
1717from .Common import get_redirect_url
1818from django .utils import timezone
19-
19+ from django . http import JsonResponse
2020
2121def recheck (request ):
2222 """Starts FIDO2 recheck"""
@@ -49,13 +49,15 @@ def begin_registeration(request):
4949def complete_reg (request ):
5050 """Completes the registeration, called by API"""
5151 try :
52+ if not "fido_state" in request .session :
53+ return JsonResponse ({'status' : 'ERR' , "message" : "FIDO Status can't be found, please try again" })
5254 data = cbor .decode (request .body )
5355
5456 client_data = CollectedClientData (data ['clientDataJSON' ])
5557 att_obj = AttestationObject ((data ['attestationObject' ]))
5658 server = getServer ()
5759 auth_data = server .register_complete (
58- request .session ['fido_state' ],
60+ request .session . pop ['fido_state' ],
5961 client_data ,
6062 att_obj
6163 )
@@ -75,7 +77,7 @@ def complete_reg(request):
7577 client .captureException ()
7678 except :
7779 pass
78- return HttpResponse ( simplejson . dumps ( {'status' : 'ERR' , "message" : "Error on server, please try again later" }) )
80+ return JsonResponse ( {'status' : 'ERR' , "message" : "Error on server, please try again later" })
7981
8082
8183def start (request ):
Original file line number Diff line number Diff line change 44
55setup (
66 name = 'django-mfa2' ,
7- version = '2.5.0 ' ,
7+ version = '2.5.1 ' ,
88 description = 'Allows user to add 2FA to their accounts' ,
99 long_description = open ("README.md" ).read (),
1010 long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments