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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user