summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2020-08-12 09:15:44 +0000
committerGitHub <noreply@github.com>2020-08-12 09:15:44 +0000
commit4c1f13c5695b117ff58a8b763bea1f10fa8628c2 (patch)
tree4e6710f0d5f80acfad0903c92d6cd533b5de91c5
parent15d70859e6be4ced840f6612ac26fc491b3b2254 (diff)
parent5257efc5f25e07a67623d86aa6a51d5d6c573809 (diff)
downloadnextcloud-server-4c1f13c5695b117ff58a8b763bea1f10fa8628c2.tar.gz
nextcloud-server-4c1f13c5695b117ff58a8b763bea1f10fa8628c2.zip
Merge pull request #22211 from nextcloud/fix/noid/rm-useless-log
remove logging message carrying no valuable information
-rw-r--r--apps/user_ldap/lib/Access.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index ef4b5c9434e..01818079802 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -46,6 +46,7 @@
namespace OCA\User_LDAP;
+use DomainException;
use OC\HintException;
use OC\Hooks\PublicEmitter;
use OC\ServerNotAvailableException;
@@ -1518,11 +1519,11 @@ class Access extends LDAPUtility {
* @param string[] $searchAttributes needs to have at least two attributes,
* otherwise it does not make sense :)
* @return string the final filter part to use in LDAP searches
- * @throws \Exception
+ * @throws DomainException
*/
private function getAdvancedFilterPartForSearch($search, $searchAttributes) {
if (!is_array($searchAttributes) || count($searchAttributes) < 2) {
- throw new \Exception('searchAttributes must be an array with at least two string');
+ throw new DomainException('searchAttributes must be an array with at least two string');
}
$searchWords = explode(' ', trim($search));
$wordFilters = [];
@@ -1553,12 +1554,8 @@ class Access extends LDAPUtility {
if ($haveMultiSearchAttributes && strpos(trim($search), ' ') !== false) {
try {
return $this->getAdvancedFilterPartForSearch($search, $searchAttributes);
- } catch (\Exception $e) {
- \OCP\Util::writeLog(
- 'user_ldap',
- 'Creating advanced filter for search failed, falling back to simple method.',
- ILogger::INFO
- );
+ } catch (DomainException $e) {
+ // Creating advanced filter for search failed, falling back to simple method. Edge case, but valid.
}
}