Skip to content

Commit

Permalink
auth
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav committed Sep 6, 2024
1 parent 4fffadc commit 3777a6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_serializer_cls(self): # pragma: no cover

def post(self, request):
"""Processes a request"""
if request.session.get("is_hijacked_user", False):
if bool(request.session.get("hijack_history")):
return Response(status=status.HTTP_403_FORBIDDEN)

serializer_cls = self.get_serializer_cls()
Expand Down Expand Up @@ -90,7 +90,7 @@ def get_serializer_cls(self):

def post(self, request):
"""Verify recaptcha response before proceeding"""
if request.session.get("is_hijacked_user", False):
if bool(request.session.get("hijack_history")):
return Response(status=status.HTTP_403_FORBIDDEN)
if settings.RECAPTCHA_SITE_KEY:
r = requests.post( # noqa: S113
Expand Down

0 comments on commit 3777a6d

Please sign in to comment.