Vergleich inc/class_captcha.php - 1.6.9 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 160Zeile 160
		// This will build a reCAPTCHA
$server = $this->server;
$public_key = $mybb->settings['captchapublickey'];

		// This will build a reCAPTCHA
$server = $this->server;
$public_key = $mybb->settings['captchapublickey'];

 

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
{
// Use secure server if HTTPS
$server = $this->secure_server;
}


eval("\$this->html = \"".$templates->get($this->captcha_template, 1, 0)."\";");
//eval("\$this->html = \"".$templates->get("member_register_regimage_recaptcha")."\";");


eval("\$this->html = \"".$templates->get($this->captcha_template, 1, 0)."\";");
//eval("\$this->html = \"".$templates->get("member_register_regimage_recaptcha")."\";");

Zeile 183Zeile 189
		}
else if($this->type == 2)
{

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

			// Names
$hash = "recaptcha_challenge_field";
$string = "recaptcha_response_field";

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

			// reCAPTCHA doesn't support hidden Captchas
return false;






		}

eval("\$this->html = \"".$templates->get("post_captcha_hidden")."\";");
return $this->html;

		}

eval("\$this->html = \"".$templates->get("post_captcha_hidden")."\";");
return $this->html;

	}

	}


function validate_captcha()
{


function validate_captcha()
{

Zeile 209Zeile 210
			$imagestring = $db->escape_string(my_strtolower($mybb->input['imagestring']));

$query = $db->simple_select("captcha", "*", "imagehash = '{$imagehash}' AND LOWER(imagestring) = '{$imagestring}'");

			$imagestring = $db->escape_string(my_strtolower($mybb->input['imagestring']));

$query = $db->simple_select("captcha", "*", "imagehash = '{$imagehash}' AND LOWER(imagestring) = '{$imagestring}'");

			$imgcheck = $db->fetch_array($query);

if(!$imgcheck['dateline'])

			$imgcheck = $db->fetch_array($query);

if(!$imgcheck)

			{
$this->set_error($lang->invalid_captcha_verify);

			{
$this->set_error($lang->invalid_captcha_verify);

 
				$db->delete_query("captcha", "imagehash = '{$imagehash}'");

			}

			}


$db->delete_query("captcha", "imagehash = '{$imagehash}'");

 
		}
elseif($this->type == 2)
{

		}
elseif($this->type == 2)
{

Zeile 226Zeile 226
			if(!$challenge || strlen($challenge) == 0 || !$response || strlen($response) == 0)
{
$this->set_error($lang->invalid_captcha);

			if(!$challenge || strlen($challenge) == 0 || !$response || strlen($response) == 0)
{
$this->set_error($lang->invalid_captcha);

			}

			}

			else
{
// We have a reCAPTCHA to handle

			else
{
// We have a reCAPTCHA to handle

Zeile 256Zeile 256
				{
// We connected, but is it correct?
fwrite($fs, $http_request);

				{
// We connected, but is it correct?
fwrite($fs, $http_request);





					while(!feof($fs))
{
$response .= fgets($fs, 1160);

					while(!feof($fs))
{
$response .= fgets($fs, 1160);

Zeile 286Zeile 286
		{
return true;
}

		{
return true;
}

 
	}

function invalidate_captcha()
{
global $db, $mybb;

if($this->type == 1)
{
// We have a normal CAPTCHA to handle
$imagehash = $db->escape_string($mybb->input['imagehash']);
if($imagehash)
{
$db->delete_query("captcha", "imagehash = '{$imagehash}'");
}
}
// Not necessary for reCAPTCHA

// Plugin hook

	}

/**

	}

/**