diff --git a/inc/config.php b/inc/config.php index 89ea333a..b4fc27d8 100644 --- a/inc/config.php +++ b/inc/config.php @@ -352,7 +352,7 @@ $config['simple_spam'] = false; $config['captcha'] = [ - // Can be false, 'recaptcha', 'hcaptcha' or 'secureimage'. + // Can be false, 'recaptcha', 'hcaptcha' or 'native'. 'provider' => false, /* * If not false, the captcha is dynamically injected on the client if the web server set the `captcha-required` @@ -372,8 +372,8 @@ 'sitekey' => '10000000-ffff-ffff-ffff-000000000001', 'secret' => '0x0000000000000000000000000000000000000000', ], - // Enable the secureimage captcha you need to change a couple of settings. Read more at: /inc/captcha/readme.md - 'secureimage' => [ + // To enable the native captcha you need to change a couple of settings. Read more at: /inc/captcha/readme.md + 'native' => [ // Custom captcha get provider path (if not working get the absolute path aka your url). 'provider_get' => '../inc/captcha/entrypoint.php', // Custom captcha check provider path diff --git a/inc/context.php b/inc/context.php index 23165377..3f8a75d6 100644 --- a/inc/context.php +++ b/inc/context.php @@ -76,14 +76,14 @@ function build_context(array $config): Context { }, NativeCaptchaQuery::class => function($c) { $config = $c->get('config'); - if ($config['captcha']['provider'] !== 'secureimage') { + if ($config['captcha']['provider'] !== 'native') { throw new RuntimeException('No native captcha service available'); } return new NativeCaptchaQuery( $c->get(HttpDriver::class), $config['domain'], - $config['captcha']['secureimage']['provider_check'], - $config['captcha']['secureimage']['extra'] + $config['captcha']['native']['provider_check'], + $config['captcha']['native']['extra'] ); } ]); diff --git a/post.php b/post.php index b461c47e..eafb1130 100644 --- a/post.php +++ b/post.php @@ -630,12 +630,12 @@ if (isset($_POST['delete'])) { // Check for CAPTCHA right after opening the board so the "return" link is in there. try { $provider = $config['captcha']['provider']; - $new_thread_capt = $config['captcha']['secureimage']['new_thread_capt']; + $new_thread_capt = $config['captcha']['native']['new_thread_capt']; $dynamic = $config['captcha']['dynamic']; // With our custom captcha provider - if (($provider === 'secureimage' && !$new_thread_capt) - || ($provider === 'secureimage' && $new_thread_capt && $post['op'])) { + if (($provider === 'native' && !$new_thread_capt) + || ($provider === 'native' && $new_thread_capt && $post['op'])) { $query = $context->get(NativeCaptchaQuery::class); $success = $query->verify($_POST['captcha_text'], $_POST['captcha_cookie']); diff --git a/templates/post_form.html b/templates/post_form.html index 19c69cfb..038395fa 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -106,11 +106,11 @@ {% trans %}Verification{% endtrans %}