1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

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 <copypaste@kittens.ph>
This commit is contained in:
清靈語 2022-10-15 22:06:26 +08:00 committed by Fred Brennan
parent 4c6a695a6f
commit 5780e78975
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -17,7 +17,7 @@
{% for javascript in config.additional_javascript %}<script type="text/javascript" src="{{ config.additional_javascript_url }}{{ javascript }}"></script>{% endfor %}
{% endif %}
{% endif %}
{% if config.recaptcha %}<script src="//www.google.com/recaptcha/api.js"></script>
{% if config.recaptcha %}<script src="//www.recaptcha.net/recaptcha/api.js"></script>
<style type="text/css">{% verbatim %}
#recaptcha_area {
float: none !important;