Zeile 135 | Zeile 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 156 | Zeile 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 216 | Zeile 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 243 | Zeile 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 268 | Zeile 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 293 | Zeile 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 324 | Zeile 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 360 | Zeile 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 409 | Zeile 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}'");
|