From 3d1148f6d8047a8e27c2d107ed7483d652fe540e Mon Sep 17 00:00:00 2001 From: Techjar Date: Mon, 8 Apr 2019 01:54:13 -0400 Subject: [PATCH] api: Escape value in _filter_string regex --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index 90dfad9..d893d85 100644 --- a/api.py +++ b/api.py @@ -31,7 +31,7 @@ def _filter_string(sessions, key, value, match=False): for session in sessions: if match: - if re.match(".*" + value + ".*", str(session[key]), re.IGNORECASE): + if re.match(".*" + re.escape(value) + ".*", str(session[key]), re.IGNORECASE): filtered_sessions.append(session) else: if session[key] == value: