diff options
author | Kevin McCarthy <kmccarth@redhat.com> | 2007-08-21 14:26:36 -0700 |
---|---|---|
committer | Kevin McCarthy <kmccarth@redhat.com> | 2007-08-21 14:26:36 -0700 |
commit | a8f302aa9f193984d68318a65a51b41298b1391d (patch) | |
tree | a9c2696b3c5e2756fea998d2ad5cc17596b90a7d /ipa-server/ipa-gui/ipagui | |
parent | ac926646ea4619f309cbd3dbe2769aad66ec0860 (diff) | |
download | freeipa-a8f302aa9f193984d68318a65a51b41298b1391d.tar.gz freeipa-a8f302aa9f193984d68318a65a51b41298b1391d.tar.xz freeipa-a8f302aa9f193984d68318a65a51b41298b1391d.zip |
Move ldap search filter escaping into the funcs.py layer.
Diffstat (limited to 'ipa-server/ipa-gui/ipagui')
-rw-r--r-- | ipa-server/ipa-gui/ipagui/controllers.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/ipa-server/ipa-gui/ipagui/controllers.py b/ipa-server/ipa-gui/ipagui/controllers.py index a1ea88ca4..bbe0f5d48 100644 --- a/ipa-server/ipa-gui/ipagui/controllers.py +++ b/ipa-server/ipa-gui/ipagui/controllers.py @@ -1,7 +1,6 @@ import random from pickle import dumps, loads from base64 import b64encode, b64decode -import re import cherrypy import turbogears @@ -38,22 +37,6 @@ def utf8_encode(value): value = value.encode('utf-8') return value -def ldap_search_escape(match): - """Escapes out nasty characters from the ldap search. - See RFC 2254.""" - value = match.group() - if (len(value) != 1): - return u"" - - if value == u"(": - return u"\\28" - elif value == u")": - return u"\\29" - elif value == u"\\": - return u"\\5c" - else: - return value - class Root(controllers.RootController): @@ -159,7 +142,6 @@ class Root(controllers.RootController): uid = kw.get('uid') if uid != None and len(uid) > 0: try: - uid = re.sub(r'[\(\)\\]', ldap_search_escape, uid) users = client.find_users(uid.encode('utf-8')) except xmlrpclib.Fault, f: turbogears.flash("User show failed: " + str(f.faultString)) |