From 5780e789752ab8be30f8b8cec6a43770bf654ef0 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 c869de9d..01a4d80c 100644 --- a/post.php +++ b/post.php @@ -401,7 +401,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 7083c70d..129cb2f2 100644 --- a/templates/header.html +++ b/templates/header.html @@ -17,7 +17,7 @@ {% for javascript in config.additional_javascript %}{% endfor %} {% endif %} {% endif %} - {% if config.recaptcha %} + {% if config.recaptcha %}