|
|
@ -403,7 +403,7 @@ class AuthenticationViewSet(viewsets.ViewSet):
|
|
|
|
elif challenge_data['userId'] != user.id:
|
|
|
|
elif challenge_data['userId'] != user.id:
|
|
|
|
content = {'code': 'wrong_user', 'detail': 'This challenge is for the wrong user'}
|
|
|
|
content = {'code': 'wrong_user', 'detail': 'This challenge is for the wrong user'}
|
|
|
|
return Response(content, status=status.HTTP_400_BAD_REQUEST)
|
|
|
|
return Response(content, status=status.HTTP_400_BAD_REQUEST)
|
|
|
|
elif host != request.get_host():
|
|
|
|
elif not settings.DEBUG and host != request.get_host():
|
|
|
|
detail = 'Found wrong host name. Got: "{}" expected: "{}"'.format(host, request.get_host())
|
|
|
|
detail = 'Found wrong host name. Got: "{}" expected: "{}"'.format(host, request.get_host())
|
|
|
|
content = {'code': 'wrong_host', 'detail': detail}
|
|
|
|
content = {'code': 'wrong_host', 'detail': detail}
|
|
|
|
return Response(content, status=status.HTTP_400_BAD_REQUEST)
|
|
|
|
return Response(content, status=status.HTTP_400_BAD_REQUEST)
|
|
|
|