diff options
author | unknown <D:\Portable\TheBat\Data\Mail> | 2013-11-01 17:26:26 +0400 |
---|---|---|
committer | unknown <D:\Portable\TheBat\Data\Mail> | 2013-11-01 17:26:26 +0400 |
commit | c098e9bce94f8e5fa4b6187b8238dd6216f591ae (patch) | |
tree | 9b5a02b9efa6bdd3a1d5cd901f9935d3d160369d | |
parent | 422f12ea946c1d725b7a859a8d89189f1a747a90 (diff) |
fix: check parameter type in acl
-rw-r--r-- | plugins/acl.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/acl.py b/plugins/acl.py index f93dd9e..2dcd5b7 100644 --- a/plugins/acl.py +++ b/plugins/acl.py @@ -83,6 +83,7 @@ def acl_add_del(jid,nick,text,flag): if acl_cmd != 'age' and acl_sub_act in ['<','>','<=','>=']: return L('Error in parameters. Read the help about command.','%s/%s'%(jid,nick)) if acl_sub_act in ['=','!=','sub','!sub']: text[0] = text[0].replace('%20',' ') else: text[0] = text[0].replace('%20','\ ') + if acl_cmd == 'age' and not text[0].isdigit(): return L('Error in parameters. Read the help about command.','%s/%s'%(jid,nick)) if acl_sub_act in ['exp','!exp','cexp','!cexp']: try: re.compile(text[0].replace('*','*?')) except: return L('Error in RegExp!','%s/%s'%(jid,nick)) |