From ee1208671e004f1a2f75594f32a410be3878162d Mon Sep 17 00:00:00 2001 From: Ivan Nikolskiy Date: Thu, 10 Jul 2025 13:19:42 +0200 Subject: [PATCH] Added new method to verify --- django_hoptcha/decorators.py | 1 - django_hoptcha/validators.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/django_hoptcha/decorators.py b/django_hoptcha/decorators.py index 501f802..409f3a8 100755 --- a/django_hoptcha/decorators.py +++ b/django_hoptcha/decorators.py @@ -135,7 +135,6 @@ def hoptcha_protected( pass # Malformed or empty JSON if not token or not verify_token(token): - print(token) return response(request) if response else JsonResponse({ "captcha": True, "url": f"{HOPTCHA_URL}?{urlencode({'client_key': HOPTCHA_CLIENT_ID, 'timestamp': int(time.time() * 1000), 'type': type})}" diff --git a/django_hoptcha/validators.py b/django_hoptcha/validators.py index 49c8cc9..00e22ff 100755 --- a/django_hoptcha/validators.py +++ b/django_hoptcha/validators.py @@ -42,8 +42,6 @@ def verify_token(token): headers = {"Content-Type": "application/json"} response = requests.post(HOPTCHA_VERIFY_URL, data=json.dumps(payload), headers=headers, timeout=5) - print(HOPTCHA_VERIFY_URL, HOPTCHA_CLIENT_SECRET) - if response.status_code == 200: return response.json().get("success", False) return False