mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-05 23:54:18 +00:00
fix cmd为空时bug
This commit is contained in:
@@ -125,6 +125,9 @@ class CommandFilterRule(OrgModelMixin):
|
|||||||
regex.append(cmd)
|
regex.append(cmd)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not cmd:
|
||||||
|
continue
|
||||||
|
|
||||||
# 如果是单个字符
|
# 如果是单个字符
|
||||||
if cmd[-1].isalpha():
|
if cmd[-1].isalpha():
|
||||||
regex.append(r'\b{0}\b'.format(cmd))
|
regex.append(r'\b{0}\b'.format(cmd))
|
||||||
|
|||||||
Reference in New Issue
Block a user