mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Support methods to load and check CAPTCHA wherever a developer wants
This commit is contained in:
parent
01984210b6
commit
307661b57b
10 changed files with 127 additions and 11 deletions
|
|
@ -115,6 +115,23 @@ class SpamfilterAdminController extends Spamfilter
|
|||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
public function procSpamfilterAdminSubmitCaptchaTest()
|
||||
{
|
||||
$response = Context::get('g-recaptcha-response') ?? Context::get('cf-turnstile-response');
|
||||
|
||||
try
|
||||
{
|
||||
SpamfilterModel::checkCaptchaResponse($response);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
return new BaseObject(-1, $e->getMessage());
|
||||
}
|
||||
|
||||
$this->setMessage('msg_recaptcha_test_success');
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminConfigCaptchaTest'));
|
||||
}
|
||||
|
||||
public function procSpamfilterAdminInsertDeniedIP()
|
||||
{
|
||||
//스팸IP 추가
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue