Vergleich inc/class_captcha.php - 1.8.9 - 1.8.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 108Zeile 108
			{
$this->captcha_template .= "_recaptcha";
}

			{
$this->captcha_template .= "_recaptcha";
}

			else if($this->type == 4){

			elseif($this->type == 4){

				$this->captcha_template .= "_nocaptcha";

				$this->captcha_template .= "_nocaptcha";

 
			}
elseif($this->type == 5){
$this->captcha_template .= "_recaptcha_invisible";

			}
}

			}
}





		// Work on which CAPTCHA we've got installed
if($this->type == 2 && $mybb->settings['captchapublickey'] && $mybb->settings['captchaprivatekey'])
{
// We want to use reCAPTCHA, set the server options
$this->server = "//www.google.com/recaptcha/api";
$this->verify_server = "www.google.com";

		// Work on which CAPTCHA we've got installed
if($this->type == 2 && $mybb->settings['captchapublickey'] && $mybb->settings['captchaprivatekey'])
{
// We want to use reCAPTCHA, set the server options
$this->server = "//www.google.com/recaptcha/api";
$this->verify_server = "www.google.com";


if($build == true)
{
$this->build_recaptcha();


if($build == true)
{
$this->build_recaptcha();

			}
}

			}
}

		else if($this->type == 4 && $mybb->settings['captchapublickey'] && $mybb->settings['captchaprivatekey'])

		elseif(in_array($this->type, array(4, 5)) && $mybb->settings['captchapublickey'] && $mybb->settings['captchaprivatekey'])

		{

		{

			// We want to use reCAPTCHA, set the server options

			// We want to use noCAPTCHA or reCAPTCHA invisible, set the server options

			$this->server = "//www.google.com/recaptcha/api.js";
$this->verify_server = "https://www.google.com/recaptcha/api/siteverify";

if($build == true)
{
$this->build_recaptcha();

			$this->server = "//www.google.com/recaptcha/api.js";
$this->verify_server = "https://www.google.com/recaptcha/api/siteverify";

if($build == true)
{
$this->build_recaptcha();

			}
}
else if($this->type == 1)

			}
}
elseif($this->type == 1)

		{
if(!function_exists("imagecreatefrompng"))

		{
if(!function_exists("imagecreatefrompng"))

			{

			{

				// We want to use the default CAPTCHA, but it's not installed
return;
}

				// We want to use the default CAPTCHA, but it's not installed
return;
}

			else if($build == true)

			elseif($build == true)

			{
$this->build_captcha();
}

			{
$this->build_captcha();
}

		}


		}


		$plugins->run_hooks('captcha_build_end', $args);
}


		$plugins->run_hooks('captcha_build_end', $args);
}


Zeile 205Zeile 208
			$field['hash'] = $db->escape_string($mybb->input['imagehash']);
$field['string'] = $db->escape_string($mybb->input['imagestring']);
}

			$field['hash'] = $db->escape_string($mybb->input['imagehash']);
$field['string'] = $db->escape_string($mybb->input['imagestring']);
}

		else if($this->type == 2)

		elseif($this->type == 2)

		{
// Names
$hash = "recaptcha_challenge_field";

		{
// Names
$hash = "recaptcha_challenge_field";

Zeile 215Zeile 218
			$field['hash'] = $mybb->input['recaptcha_challenge_field'];
$field['string'] = $mybb->input['recaptcha_response_field'];
}

			$field['hash'] = $mybb->input['recaptcha_challenge_field'];
$field['string'] = $mybb->input['recaptcha_response_field'];
}

		else if($this->type == 3)

		elseif($this->type == 3)

		{
// Are You a Human can't be built as a hidden captcha
return '';

		{
// Are You a Human can't be built as a hidden captcha
return '';

Zeile 317Zeile 320
				}
}
}

				}
}
}

		elseif($this->type == 4)

		elseif(in_array($this->type, array(4, 5)))

		{
$response = $mybb->input['g-recaptcha-response'];
if(!$response || strlen($response) == 0)

		{
$response = $mybb->input['g-recaptcha-response'];
if(!$response || strlen($response) == 0)

Zeile 326Zeile 329
			}
else
{

			}
else
{

				// We have a noCAPTCHA to handle

				// We have a noCAPTCHA or reCAPTCHA invisible to handle

				// Contact Google and see if our reCAPTCHA was successful
$response = fetch_remote_file($this->verify_server, array(
'secret' => $mybb->settings['captchaprivatekey'],

				// Contact Google and see if our reCAPTCHA was successful
$response = fetch_remote_file($this->verify_server, array(
'secret' => $mybb->settings['captchaprivatekey'],