Vergleich inc/class_captcha.php - 1.8.27 - 1.8.37

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

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

			elseif($this->type == captcha::HCAPTCHA_INVISIBLE)

			elseif($this->type == captcha::RECAPTCHA_V3)

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

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

Zeile 156Zeile 156
		elseif(in_array($this->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)) && $mybb->settings['hcaptchapublickey'] && $mybb->settings['hcaptchaprivatekey'])
{
// We want to use hCaptcha or hCaptcha invisible, set the server options

		elseif(in_array($this->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)) && $mybb->settings['hcaptchapublickey'] && $mybb->settings['hcaptchaprivatekey'])
{
// We want to use hCaptcha or hCaptcha invisible, set the server options

			$this->server = "//www.hcaptcha.com/1/api.js";

			$this->server = "//js.hcaptcha.com/1/api.js";

			$this->verify_server = "https://hcaptcha.com/siteverify";

if($build == true)

			$this->verify_server = "https://hcaptcha.com/siteverify";

if($build == true)

Zeile 216Zeile 216

function build_hcaptcha()
{


function build_hcaptcha()
{

		global $lang, $mybb, $templates;

		global $lang, $mybb, $templates, $theme;


// This will build a hCaptcha
$server = $this->server;


// This will build a hCaptcha
$server = $this->server;

Zeile 243Zeile 243
			$string = "imagestring";

// Values

			$string = "imagestring";

// Values

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

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

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

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

Zeile 268Zeile 268
		if($this->type == captcha::DEFAULT_CAPTCHA)
{
// We have a normal CAPTCHA to handle

		if($this->type == captcha::DEFAULT_CAPTCHA)
{
// We have a normal CAPTCHA to handle

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

			$imagehash = $db->escape_string($mybb->get_input('imagehash'));
$imagestring = $db->escape_string(my_strtolower($mybb->get_input('imagestring')));


switch($db->type)
{


switch($db->type)
{

Zeile 293Zeile 293
		}
elseif(in_array($this->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE)))
{

		}
elseif(in_array($this->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE)))
{

			$response = $mybb->input['g-recaptcha-response'];

			$response = $mybb->get_input('g-recaptcha-response');

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

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

Zeile 324Zeile 324
				}
}
}

				}
}
}

		elseif($this->type == captcha::HCAPTCHA_INVISIBLE)

		elseif($this->type == captcha::RECAPTCHA_V3)

		{

		{

			$response = $mybb->input['g-recaptcha-response'];

			$response = $mybb->get_input('g-recaptcha-response');

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

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

Zeile 360Zeile 360
		}
elseif(in_array($this->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))
{

		}
elseif(in_array($this->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))
{

			$response = $mybb->input['h-captcha-response'];

			$response = $mybb->get_input('h-captcha-response');

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

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

Zeile 409Zeile 409
		if($this->type == captcha::DEFAULT_CAPTCHA)
{
// We have a normal CAPTCHA to handle

		if($this->type == captcha::DEFAULT_CAPTCHA)
{
// We have a normal CAPTCHA to handle

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

			$imagehash = $db->escape_string($mybb->get_input('imagehash'));

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

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