9
0
mirror of https://github.com/hybula/whmcs-turnstile.git synced 2026-01-04 15:31:46 +00:00

Ensure logins are unsuccessful when captcha has failed

This commit is contained in:
dqos
2024-01-03 10:13:54 +01:00
parent 7d278ae5b0
commit 3812ceb0c5

View File

@@ -28,6 +28,7 @@ if (!empty($_POST)) {
($pageFile == 'ticket' && in_array('ticket', hybulaTurnstileLocations)) ||
($pageFile == 'cart' && $_GET['a'] == 'checkout' && in_array('checkout', hybulaTurnstileLocations))) && hybulaTurnstileEnabled) {
if (!isset($_POST['cf-turnstile-response'])) {
unset($_SESSION['uid']);
die('Missing captcha response in POST data!');
}
@@ -53,6 +54,7 @@ if (!empty($_POST)) {
curl_close($curl);
if ($json = json_decode($result)) {
if (!$json->success) {
unset($_SESSION['uid']);
die(hybulaTurnstileError);
}
}