This commit is contained in:
Marc Ole Bulling 2020-12-28 22:11:10 +01:00
parent 6263715c53
commit 8401bd3dc7
No known key found for this signature in database
GPG Key ID: C126AFC2A47B06FF

View File

@ -51,7 +51,8 @@ class SystemApiController extends BaseApiController
$params = $request->getQueryParams();
if (isset($params['offset']))
{
if (!filter_var($params['offset'], FILTER_VALIDATE_INT))
//Checks if int. Without the === 0 this would return false if 0 was passed as an argument
if (!(filter_var($params['offset'], FILTER_VALIDATE_INT) === 0 || filter_var($params['offset'], FILTER_VALIDATE_INT)))
{
throw new \Exception('Query parameter "offset" is not a valid integer');
}