Vergleich inc/class_captcha.php - 1.6.5 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 31Zeile 31
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*

 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*

 * $Id: class_captcha.php 5605 2011-09-19 11:17:26Z Tomm $

 * $Id$

 */

class captcha

 */

class captcha

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 167Zeile 173

function build_hidden_captcha()
{


function build_hidden_captcha()
{

		global $mybb, $templates;

		global $db, $mybb, $templates;


$field = array();



$field = array();


Zeile 180Zeile 186
			// Values
$field['hash'] = $db->escape_string($mybb->input['imagehash']);
$field['string'] = $db->escape_string($mybb->input['imagestring']);

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

		}

		}

		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")."\";");

		}

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

Zeile 214Zeile 215
			if(!$imgcheck['dateline'])
{
$this->set_error($lang->invalid_captcha_verify);

			if(!$imgcheck['dateline'])
{
$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 272Zeile 272
						// We got it wrong! Oh no...
$this->set_error($lang->invalid_captcha_verify);
}

						// We got it wrong! Oh no...
$this->set_error($lang->invalid_captcha_verify);
}

				}
}
}


				}
}
}


		// Plugin hook

if(count($this->errors) > 0)

		// Plugin hook

if(count($this->errors) > 0)

Zeile 312Zeile 312
		foreach($this->errors as $error)
{
$lang_string = $error['error_code'];

		foreach($this->errors as $error)
{
$lang_string = $error['error_code'];

			














if(!$lang_string)
{
if($lang->invalid_captcha_verify)
{
$lang_string = 'invalid_captcha_verify';
}
else
{
$lang_string = 'unknown_error';
}
}


			if(!$lang->$lang_string)
{
$errors[] = $error['error_code'];

			if(!$lang->$lang_string)
{
$errors[] = $error['error_code'];