Skip to content

Commit

Permalink
modified turnsite token key for hcaptcha
Browse files Browse the repository at this point in the history
  • Loading branch information
alimaktabi committed Sep 7, 2024
1 parent 0004e2e commit 2b375da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/constraints/captcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def is_observed(self, *args, **kwargs) -> bool:
context["request"]
)

turnstile_token = request_context.data.get("cf-turnstile-response")
turnstile_token = request_context.data.get("hc-turnstile-response") or request_context.data.get("cf-turnstile-response")

return request_context.ip is not None and turnstile_token is not None and hcaptcha.is_verified(
turnstile_token, request_context.ip
Expand Down

0 comments on commit 2b375da

Please sign in to comment.