search: disallow negative offsets

a negative offset should not be allowed.

Change-Id: Ie5bbda72ec846c0f01d0cec61bbd660130bd6473
This commit is contained in:
David Causse 2023-06-22 16:39:17 +02:00
parent 888cf61c8c
commit 1d7b323c81

View file

@ -87,6 +87,7 @@ trait SearchApi {
if ( $isScrollable ) {
$params['offset'] = [
ParamValidator::PARAM_DEFAULT => 0,
IntegerDef::PARAM_MIN => 0,
ParamValidator::PARAM_TYPE => 'integer',
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
];