You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/10/16 23:36:09 UTC

[incubator-ponymail-foal] branch master updated: don't use query for matching, use raw text

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 16c1869  don't use query for matching, use raw text
16c1869 is described below

commit 16c1869e36a4c5830bc7905c68959812cbe19e81
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 17 01:36:00 2021 +0200

    don't use query for matching, use raw text
---
 server/plugins/defuzzer.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/plugins/defuzzer.py b/server/plugins/defuzzer.py
index 846fdeb..eaf3eee 100644
--- a/server/plugins/defuzzer.py
+++ b/server/plugins/defuzzer.py
@@ -189,9 +189,8 @@ def defuzz(formdata: dict, nodate: bool = False, list_override: typing.Optional[
     for header in ["from", "subject", "body", "to"]:
         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}}})
+            hvalue = formdata[hname]
+            must.append({"match": {header: hvalue}})
 
     thebool = {"must": must}