Skip to content

Commit

Permalink
Update api/gen_ai/views.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew T <[email protected]>
  • Loading branch information
rohitvinnakota-codecov and mdtro committed Jan 17, 2025
1 parent 624ee10 commit ac5908b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions api/gen_ai/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
from hashlib import sha256

from django.utils.crypto import constant_time_compare
from rest_framework.exceptions import NotFound, PermissionDenied
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
Expand Down Expand Up @@ -30,7 +29,6 @@ def validate_signature(self, request):
if isinstance(key, str):
key = key.encode("utf-8")

Check warning on line 30 in api/gen_ai/views.py

View check run for this annotation

Codecov Notifications / codecov/patch

api/gen_ai/views.py#L30

Added line #L30 was not covered by tests
expected_sig = request.headers.get("HTTP-X-GEN-AI-AUTH-SIGNATURE")
print(request.headers)
computed_sig = (
"sha256=" + hmac.new(key, request.body, digestmod=sha256).hexdigest()
)
Expand Down

0 comments on commit ac5908b

Please sign in to comment.