This is an automated email from the ASF dual-hosted git repository.

sebb 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 cf6bcc7  Does not make sense to default to all lists
cf6bcc7 is described below

commit cf6bcc789d186e6514561137c95594e900134e39
Author: Sebb <[email protected]>
AuthorDate: Sat Nov 20 19:15:08 2021 +0000

    Does not make sense to default to all lists
---
 server/plugins/defuzzer.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/plugins/defuzzer.py b/server/plugins/defuzzer.py
index b6467d8..aef4a92 100644
--- a/server/plugins/defuzzer.py
+++ b/server/plugins/defuzzer.py
@@ -102,12 +102,13 @@ def defuzz(formdata: dict, nodate: bool = False, 
list_override: typing.Optional[
                     }
 
     # List parameter(s)
-    fqdn = formdata.get("domain", "*")  # If left out entirely, assume 
wildcard search
-    listname = formdata.get("list", "*")  # If left out entirely, assume 
wildcard search
     if list_override:  # Certain requests use the full list ID as a single 
variable. Allow for that if so.
         if not list_override.count("@") == 1:
             raise ValueError("list_override must contain exactly one @ 
character")
         listname, fqdn = list_override.split("@", 1)
+    else:
+        fqdn = formdata.get("domain")  # Must be provided
+        listname = formdata.get("list")  # Must be provided
     if not fqdn:
         raise ValueError("You must specify a domain part of the mailing 
list(s) to search, or * for wildcard search.")
     if not listname:

Reply via email to