reCAPTCHA停止工作-无效的加密 [英] reCAPTCHA stopped working - Invalid Encryption

查看:270
本文介绍了reCAPTCHA停止工作-无效的加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网站上使用reCAPTCHA一段时间了,突然我意识到它已经停止工作了. reCAPTCHA在那里,但是在正确验证之后,响应FAILS失败,这使得表单提交失败.

I have been using reCAPTCHA on my site for a while now and suddenly I realized it has stopped to work. The reCAPTCHA is there, however after verifying correctly, the response FAILS which makes the submit of the form fail.

在客户端控制台上,浏览器显示错误:

On the client side console, the browser gives an error:

未捕获(承诺)的无效加密.

Uncaught (in promise) Invalid Encryption.

我尝试搜索此错误,但是找不到任何类似的内容. 提交表单后,PHP中的服务器端验证失败.我不确定上面的错误是否相关,但是以前从未出现过.

I have tried to search for this error but can not find anything similar. After submitting the form, the server side verification in PHP fails. I am not sure if the error above is related, however, it has not been there before.

客户端集成示例页面:

<html>
<head>
    <title>reCAPTCHA demo: Simple page</title>
     <script src="https://www.google.com/recaptcha/api.js" async defer> 
</script>
</head>
  <body>
    <form action="?" method="POST">
      <div class="g-recaptcha" data-sitekey="your_site_key"></div>
      <br/>
      <input type="submit" value="Submit">
    </form>
   </body>
</html>

服务器端验证PHP:

$response = json_decode( 
    file_get_contents( 
 "https://www.google.com/recaptcha/api/siteverifysecret=MY_SECRET&response=".$_POST['g-recaptcha-response']."&remoteip=".$_SERVER['REMOTE_ADDR'] ), true );

if($response['success'] == false){
    echo "FAIL";
} else {
    //do something
}

我已按照此处中找到的说明进行操作.

I have followed the instructions found here.

推荐答案

昨天我遇到了同样的问题. Google似乎已经意识到了这个问题,并且正在努力解决该问题.他们声称它不应该影响reCAPTCHA的整体功能.

I ran into the same problem yesterday. It looks as though Google has acknowledged the problem and is working toward fixing it. They claim it shouldn't affect the overall function of the reCAPTCHA.

我在此处获得了此信息.

下面是对话的屏幕截图.

Below is a screen shot of the conversation.

这篇关于reCAPTCHA停止工作-无效的加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆