We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ec0e99 commit b1b6a2bCopy full SHA for b1b6a2b
registrations/views.py
@@ -684,7 +684,7 @@ def validate_signature(self, request):
684
685
h = hmac.new(secret.encode(), request.body, sha256)
686
687
- if base64.b64encode(h.digest()).decode() != signature:
+ if not hmac.compare_digest(base64.b64encode(h.digest()).decode(), signature):
688
raise AuthenticationFailed("Invalid hook signature")
689
690
def get_msisdn(self, data):
0 commit comments