diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-02-22 02:22:06 +0300 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-06-01 13:33:41 +0300 |
commit | fef75ff2c0257d66071079da20d700d240a1d6fa (patch) | |
tree | 6b287b376302741699ac6f286cded8c0ddab9984 /apps/files_sharing | |
parent | 26c8f82ba23b202fcd120d1a525838294a66ecd1 (diff) |
Use intval() for validation of config options
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing')
-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 8f44e650c43..5261fc80316 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -429,13 +429,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); } |