Skip to content

Commit 132ceec

Browse files
committed
Fix "*" semantics
1 parent d2e9acd commit 132ceec

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

mrq/dashboard/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ def build_api_datatables_query(req):
128128

129129
for param in ["queue", "path", "exceptiontype"]:
130130
if req.args.get(param):
131-
if "*" in req.args.get(param):
132-
query[param] = re.compile("^"+req.args.get(param)+"$")
131+
if "*" in req.args[param]:
132+
regexp = "^%s$" % re.escape(req.args[param]).replace("*", ".*")
133+
query[param] = re.compile(regexp)
133134
else:
134-
query[param] = req.args.get(param)
135+
query[param] = req.args[param]
135136

136137
if req.args.get("status"):
137138
statuses = req.args["status"].split("-")

0 commit comments

Comments
 (0)