diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-20 16:55:18 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-02-20 16:55:18 +0100 |
commit | 0624476aa19a63b1f4e35f35e151c3fc46cb697f (patch) | |
tree | 67e9ead3bfd44e7efe3f4a6d1325866075dbd702 /apps/user_ldap/lib/access.php | |
parent | f33d35cd073addb08c78a65b719c72eb5424434a (diff) | |
parent | ec45a3c0e2567c89729bc6fe8c996b7939025429 (diff) | |
download | nextcloud-server-0624476aa19a63b1f4e35f35e151c3fc46cb697f.tar.gz nextcloud-server-0624476aa19a63b1f4e35f35e151c3fc46cb697f.zip |
Merge branch 'master' into mimeicons-svg
Diffstat (limited to 'apps/user_ldap/lib/access.php')
-rw-r--r-- | apps/user_ldap/lib/access.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 6795aecafee..b7e4023dd73 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -922,6 +922,17 @@ class Access extends LDAPUtility { } /** + * @brief escapes (user provided) parts for LDAP filter + * @param String $input, the provided value + * @returns the escaped string + */ + public function escapeFilterPart($input) { + $search = array('*', '\\', '(', ')'); + $replace = array('\\*', '\\\\', '\\(', '\\)'); + return str_replace($search, $replace, $input); + } + + /** * @brief combines the input filters with AND * @param $filters array, the filters to connect * @returns the combined filter |