mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Add captcha validation to API request handling
This commit is contained in:
parent
0adec8a983
commit
c98ce764a9
1 changed files with 2 additions and 0 deletions
|
@ -4000,6 +4000,8 @@ class API extends PluginAbstract
|
||||||
if(empty($_REQUEST['captcha'])){
|
if(empty($_REQUEST['captcha'])){
|
||||||
return new ApiObject("Captcha is required");
|
return new ApiObject("Captcha is required");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once $global['systemRootPath'] . 'objects/captcha.php';
|
||||||
$valid = Captcha::validation($_REQUEST['captcha']);
|
$valid = Captcha::validation($_REQUEST['captcha']);
|
||||||
if(!$valid){
|
if(!$valid){
|
||||||
return new ApiObject("Captcha is wrong");
|
return new ApiObject("Captcha is wrong");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue