From 2d792c6be0c076f5daf3672e07fc6438c1a37339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E9=9D=88=E8=AA=9E?= Date: Sat, 15 Oct 2022 22:06:26 +0800 Subject: [PATCH] Replace Google reCAPTCHA API's domain (#507) This makes it accessible in mainland China. Sources: google/recaptcha#227 https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally https://meta.stackoverflow.com/questions/402339/please-change-the-recaptcha-link-to-ensure-the-site-is-accessible-in-china Co-Authored-By: Fredrick Brennan --- post.php | 2 +- templates/header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/post.php b/post.php index c0d66424..b7b89b86 100644 --- a/post.php +++ b/post.php @@ -444,7 +444,7 @@ if (isset($_POST['delete'])) { error($config['error']['bot']); // Check what reCAPTCHA has to say... - $resp = json_decode(file_get_contents(sprintf('https://www.google.com/recaptcha/api/siteverify?secret=%s&response=%s&remoteip=%s', + $resp = json_decode(file_get_contents(sprintf('https://www.recaptcha.net/recaptcha/api/siteverify?secret=%s&response=%s&remoteip=%s', $config['recaptcha_private'], urlencode($_POST['g-recaptcha-response']), $_SERVER['REMOTE_ADDR'])), true); diff --git a/templates/header.html b/templates/header.html index 7e70d3bf..78318504 100644 --- a/templates/header.html +++ b/templates/header.html @@ -21,7 +21,7 @@ {% endif %} {% endif %} - {% if config.recaptcha %} + {% if config.recaptcha %}