mirror of
https://github.com/nextcloud/server.git
synced 2026-04-02 07:35:13 -04:00
Check limit and offset parameters sent to controller
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
afcebd1e92
commit
e51d20479e
1 changed files with 7 additions and 0 deletions
|
|
@ -246,6 +246,13 @@ class UsersController extends AUserData {
|
|||
if ($currentUser === null) {
|
||||
return new DataResponse(['users' => []]);
|
||||
}
|
||||
if ($limit !== null && $limit < 0) {
|
||||
throw new InvalidArgumentException("Invalid limit value: $limit");
|
||||
}
|
||||
if ($offset < 0) {
|
||||
throw new InvalidArgumentException("Invalid offset value: $offset");
|
||||
}
|
||||
|
||||
$users = [];
|
||||
|
||||
// Admin? Or SubAdmin?
|
||||
|
|
|
|||
Loading…
Reference in a new issue