BUG 13436 ProcessMaker 2.x Authenticated PHP Code Execution SOLVED

- The function sent in the variable $_REQUEST['action'] was always executed
- A new method was implemented to validate if is a user custom function or a system function (G::isUserFunction)
This commit is contained in:
Julio Cesar Laura
2013-10-30 20:01:43 -04:00
parent 61d529c2e0
commit 50282bab93
5 changed files with 54 additions and 46 deletions

View File

@@ -5,7 +5,7 @@ if (! isset( $_REQUEST['action'] )) {
print G::json_encode( $res );
die();
}
if (! function_exists( $_REQUEST['action'] )) {
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
$res['success'] = 'failure';
$res['message'] = 'The requested action does not exist';
header( "Content-Type: application/json" );