Merge branch 'QA_4_6'
This commit is contained in:
commit
3bd6d4c645
@ -38,6 +38,7 @@ phpMyAdmin - ChangeLog
|
||||
|
||||
4.6.6 (not yet released)
|
||||
- issue #12762 Fixed parsing of SQL with BINARY function
|
||||
- issue #12588 ReCaptcha now works without allow_url_fopen
|
||||
|
||||
4.6.5.1 (2016-11-25)
|
||||
- issue #12735 Incorrect parameters to escapeString in Node.php
|
||||
|
||||
@ -14,7 +14,7 @@ use PMA\libraries\Message;
|
||||
use PMA\libraries\plugins\AuthenticationPlugin;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use ReCaptcha\ReCaptcha;
|
||||
use ReCaptcha;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once './libraries/session.lib.php';
|
||||
@ -278,10 +278,22 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
&& ! empty($GLOBALS['cfg']['CaptchaLoginPublicKey'])
|
||||
) {
|
||||
if (! empty($_POST["g-recaptcha-response"])) {
|
||||
|
||||
$reCaptcha = new ReCaptcha(
|
||||
$GLOBALS['cfg']['CaptchaLoginPrivateKey']
|
||||
);
|
||||
if (function_exists('curl_init')) {
|
||||
$reCaptcha = new ReCaptcha\ReCaptcha(
|
||||
$GLOBALS['cfg']['CaptchaLoginPrivateKey'],
|
||||
new ReCaptcha\RequestMethod\CurlPost()
|
||||
);
|
||||
} else if (ini_get('allow_url_fopen')) {
|
||||
$reCaptcha = new ReCaptcha\ReCaptcha(
|
||||
$GLOBALS['cfg']['CaptchaLoginPrivateKey'],
|
||||
new ReCaptcha\RequestMethod\Post()
|
||||
);
|
||||
} else {
|
||||
$reCaptcha = new ReCaptcha\ReCaptcha(
|
||||
$GLOBALS['cfg']['CaptchaLoginPrivateKey'],
|
||||
new ReCaptcha\RequestMethod\SocketPost()
|
||||
);
|
||||
}
|
||||
|
||||
// verify captcha status.
|
||||
$resp = $reCaptcha->verify(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user