django-mfa2 icon indicating copy to clipboard operation
django-mfa2 copied to clipboard

AttributeError: 'UnicodeDecodeError' object has no attribute 'message'

Open 41WhiteElephants opened this issue 1 year ago • 1 comments

In FIDO2.py there's wrong code raising exception in exception handling block image

Current: image

Expected:

return HttpResponse(
            simplejson.dumps({"status": "ERR", "message": str(exp)}),
            content_type="application/json",
            status=400
        )

Steps to reproduce: call fido2_complete_auth endpoint with some random bytes encoded into payload before cbor.encode call

41WhiteElephants avatar Jan 30 '24 14:01 41WhiteElephants

Sorry, just saw this, you can add it to your PR.

Thanks

mkalioby avatar Feb 14 '24 04:02 mkalioby