After user submitted form post, I'm essentially doing this: Sanitize JSON with php to sanitize my json_decoded input.
json_decode creates an object which I pass to custom class method:
$body = json_decode($_POST['body']);
$form_id = $_POST['form_id'];
$errors = $this->validate_form( $form_id, $body, $options );
In $this->validate_form, I immediately do validation similarly to solutions in link above.
Is there a security gap in assigning decoded json, form_id to variables at runtime, and then passing these values through to custom method, even if the first thing done with them after is sanitizing?
I.e. is there some exploit, like a fancy json encoded 'call_user_func' etc that can be implemented here, just by simply passing values/storing run time values?
edit: (also just to clarify, i'm not doing anything obviously terrible after like call_user_func($form_id);
)