mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
Switch reCAPTCHA endpoints to recaptcha.net
Signed-off-by: Qi HU <github@spcsky.com>
This commit is contained in:
@@ -45,7 +45,7 @@ class RecaptchaV2CaptchaDriver implements CaptchaDriverInterface
|
||||
'<tr><td class="rowhead">%s</td><td align="left"><div %s></div>%s</td></tr>',
|
||||
htmlspecialchars($label, ENT_QUOTES, 'UTF-8'),
|
||||
$attributes,
|
||||
'<script src="https://www.google.com/recaptcha/api.js" async defer></script>'
|
||||
'<script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class RecaptchaV2CaptchaDriver implements CaptchaDriverInterface
|
||||
$data['remoteip'] = $remoteIp;
|
||||
}
|
||||
|
||||
$result = $this->sendVerificationRequest('https://www.google.com/recaptcha/api/siteverify', $data);
|
||||
$result = $this->sendVerificationRequest('https://www.recaptcha.net/recaptcha/api/siteverify', $data);
|
||||
|
||||
if (!($result['success'] ?? false)) {
|
||||
throw new CaptchaValidationException('Captcha verification failed.');
|
||||
|
||||
Reference in New Issue
Block a user