Skip to content

Commit

Permalink
Dev: Better security in QuickMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed May 10, 2016
1 parent 1b1b8c5 commit 6238bf9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions application/core/plugins/QuickMenu/QuickMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,12 +550,16 @@ public function newDirectRequest()
// you can get other params from the request object
$request = $event->get('request');

//get the function name to call and use the method call_user_func
$functionToCall = $event->get('function');
//$content = call_user_func(array($this,$functionToCall), $surveyId);
//set the content on the event
//$event->setContent($this, $content);
echo $this->$functionToCall($request);

if ($functionToCall == 'saveOrder')
{
echo $this->saveOrder($request);
}
else
{
throw new \CException("Invalid request: not supported method: " . $functionToCall);
}
}
}
}

0 comments on commit 6238bf9

Please sign in to comment.