Skip to content

Commit 5fbb505

Browse files
committed
1 parent 0936ea2 commit 5fbb505

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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.

mfa/FIDO2.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import datetime
1717
from .Common import get_redirect_url
1818
from django.utils import timezone
19-
19+
from django.http import JsonResponse
2020

2121
def recheck(request):
2222
"""Starts FIDO2 recheck"""
@@ -49,13 +49,15 @@ def begin_registeration(request):
4949
def 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

8183
def start(request):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
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",

0 commit comments

Comments
 (0)