fix hs
This commit is contained in:
@@ -31,9 +31,9 @@ def hs(phenny, input):
|
|||||||
results = RESULTS_URL.format(urlquote(q))
|
results = RESULTS_URL.format(urlquote(q))
|
||||||
|
|
||||||
try:
|
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:
|
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:
|
except ldap.FILTER_ERROR:
|
||||||
phenny.reply('Filter error; try to avoid injection attacks in the future please.')
|
phenny.reply('Filter error; try to avoid injection attacks in the future please.')
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user