mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
feat(captcha): Added Text Captcha
provider (#1839)
* feat(captcha): Added `Text Captcha` provider * Create TextCaptcha.php * Updated * Update composer.lock * Updated * Update config.php * Update functions.php * Update TextCaptcha.php * Update TextCaptcha.php * Update TextCaptcha.php * Update TextCaptcha.php * Update TextCaptcha.php * Update TextCaptcha.php * Update TextCaptcha.php
This commit is contained in:
parent
8ad080ff2f
commit
74ea1573b2
7 changed files with 165 additions and 31 deletions
|
@ -2057,7 +2057,7 @@ function bb_captcha(string $mode): bool|string
|
|||
$settings['language'] = $bb_cfg['default_lang'];
|
||||
|
||||
// Checking captcha settings
|
||||
if (!$settings['disabled']) {
|
||||
if (!$settings['disabled'] && $settings['service'] !== 'text') {
|
||||
if (empty($settings['public_key']) || empty($settings['secret_key'])) {
|
||||
bb_die($lang['CAPTCHA_SETTINGS']);
|
||||
}
|
||||
|
@ -2070,6 +2070,7 @@ function bb_captcha(string $mode): bool|string
|
|||
'hCaptcha' => \TorrentPier\Captcha\HCaptcha::class,
|
||||
'yandex' => \TorrentPier\Captcha\YandexSmartCaptcha::class,
|
||||
'cloudflare' => \TorrentPier\Captcha\CloudflareTurnstileCaptcha::class,
|
||||
'text' => \TorrentPier\Captcha\TextCaptcha::class
|
||||
];
|
||||
if (!isset($captchaClasses[$settings['service']])) {
|
||||
bb_die(sprintf('Captcha service (%s) not supported', $settings['service']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue