fix(legacy): validate id param in show image controller (#1510)
This commit is contained in:
parent
d986302de2
commit
fd580d689f
|
@ -326,6 +326,16 @@ class Rest_ShowImageController extends Zend_Rest_Controller
|
|||
return false;
|
||||
}
|
||||
|
||||
$id = filter_var($id, FILTER_VALIDATE_INT);
|
||||
|
||||
if ($id === false) {
|
||||
$resp = $this->getResponse();
|
||||
$resp->setHttpResponseCode(400);
|
||||
$resp->appendBody('ERROR: Invalid show ID specified.');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue