This commit is contained in:
dignajar 2016-12-01 20:51:44 -03:00
parent 3c2ddf7804
commit 9f77cefd67
1 changed files with 5 additions and 3 deletions

View File

@ -104,9 +104,7 @@ class pluginAPI extends Plugin {
if( empty($inputs) ) { if( empty($inputs) ) {
// Default variables for $input // Default variables for $input
$inputs = array( $inputs = array();
'token'=>''
);
} }
else { else {
// Sanitize inputs // Sanitize inputs
@ -140,6 +138,10 @@ class pluginAPI extends Plugin {
// Check authentication // Check authentication
if( $this->getDbField('authentication')==1 ) { if( $this->getDbField('authentication')==1 ) {
if( empty($inputs['token']) ) {
return false;
}
if( $inputs['token']!=$this->getDbField('token') ) { if( $inputs['token']!=$this->getDbField('token') ) {
return false; return false;
} }