This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 0fbba81 forward slashes are reserved characters in ES
0fbba81 is described below
commit 0fbba816172246b79798ff7c904a9e03005f52d6
Author: Daniel Gruno <[email protected]>
AuthorDate: Sat Sep 25 13:01:35 2021 -0500
forward slashes are reserved characters in ES
---
server/plugins/defuzzer.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/plugins/defuzzer.py b/server/plugins/defuzzer.py
index 970d62c..8572d0e 100644
--- a/server/plugins/defuzzer.py
+++ b/server/plugins/defuzzer.py
@@ -120,6 +120,7 @@ def defuzz(formdata: dict, nodate: bool = False,
list_override: typing.Optional[
# - "this sentence": find emails with this exact string
if "q" in formdata:
qs = formdata["q"].replace(":", "")
+ qs = qs.replace("/", " ") # Forward slashes are reserved characters
bits = shlex.split(qs)
should = []
@@ -168,6 +169,7 @@ def defuzz(formdata: dict, nodate: bool = False,
list_override: typing.Optional[
hname = "header_%s" % header
if hname in formdata:
hvalue = formdata[hname] # .replace('"', "")
+ hvalue = hvalue.replace("/", " ") # Forward slashes are reserved
characters
must.append({"match": {header: {"query": hvalue}}})
thebool = {"must": must}