From 8d4e0a741bd3a577ad8e48806a405456cab0eda5 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Wed, 14 Sep 2011 20:27:29 -0400 Subject: [PATCH] fix hs --- modules/hs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hs.py b/modules/hs.py index f5b846c..8add40f 100755 --- a/modules/hs.py +++ b/modules/hs.py @@ -31,9 +31,9 @@ def hs(phenny, input): results = RESULTS_URL.format(urlquote(q)) try: - s = search('(|(uupid={0})(mail={0})(cn={1}))'.format(q[0], ' '.join(q))) + s = search('(|(uupid={0})(mail={0})(cn={1}))'.format(q)) if not s: - s = search('(|(uupid=*{0}*)(mail=*{0}*)(cn=*{1}*))'.format(q[0], '*'.join(q))) + s = search('(|(uupid=*{0}*)(mail=*{0}*)(cn=*{1}*))'.format(q, '*'.join(q.split(' ')))) except ldap.FILTER_ERROR: phenny.reply('Filter error; try to avoid injection attacks in the future please.') return