ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject incubator-ponymail git commit: Tighten search parameters when doing wildcard searches
Date Tue, 24 Jan 2017 14:07:26 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 78342028f -> 696f470f4


Tighten search parameters when doing wildcard searches

Ideally, we'll only ever search within the same domain level when
doing a wildcard search. Changing this to a regexp will allow us
to find *.foo.bar without including *.baz.foo.bar in the results.
This fixes #348.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/696f470f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/696f470f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/696f470f

Branch: refs/heads/master
Commit: 696f470f43bd9dd12d1fdf0d3c9c5c8739d95231
Parents: 7834202
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Tue Jan 24 15:07:06 2017 +0100
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Tue Jan 24 15:07:06 2017 +0100

----------------------------------------------------------------------
 CHANGELOG.md       | 2 ++
 site/api/stats.lua | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/696f470f/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ffb461..9031a07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -132,6 +132,8 @@
 - search phrase dropped from list.html URI if date span is yyyy-mm (#347)
 - stats.lua first/last dates don't always agree with visible mails (#350)
 - Use constant for max list count instead of 500000 (#352)
+- Tighten wildcard searches to only search in the same domain level (#348)
+
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/696f470f/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index b29c97a..d8e4801 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -250,8 +250,8 @@ function handle(r)
     if get.list == "*" then
         wc = true
         sterm = {
-            wildcard = {
-                list = "*." .. get.domain
+            regexp = {
+                list = "^[^.]+." .. get.domain .. "$"
             }
         }
     end


Mime
View raw message