diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-02-21 17:22:06 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-02-21 17:22:06 -0600 |
commit | 8e3d0fecd237a457fe66e00bc293923dae9a5adf (patch) | |
tree | a92841d5891fed07968c3bb55afb147d728b7312 /apps/files_sharing/lib | |
parent | 3284efd1996854df0252d3e40574759e698b812d (diff) | |
download | nextcloud-server-8e3d0fecd237a457fe66e00bc293923dae9a5adf.tar.gz nextcloud-server-8e3d0fecd237a457fe66e00bc293923dae9a5adf.zip |
Use intval() for validation of config options
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 171fac4dbd2..73f804faace 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -415,13 +415,13 @@ class ShareesAPIController extends OCSController { public function search($search = '', $itemType = null, $page = 1, $perPage = 200, $shareType = null, $lookup = true) { // only search for string larger than a given threshold - $threshold = $this->config->getSystemValue('sharing.minSearchStringLength', 0); + $threshold = intval($this->config->getSystemValue('sharing.minSearchStringLength', 0)); if (strlen($search) < $threshold) { return new Http\DataResponse($this->result); } // never return more than the max. number of results configured in the config.php - $maxResults = $this->config->getSystemValue('sharing.maxAutocompleteResults', 0); + $maxResults = intval($this->config->getSystemValue('sharing.maxAutocompleteResults', 0)); if ($maxResults > 0) { $perPage = min($perPage, $maxResults); } |