You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2019/09/05 11:27:20 UTC

[incubator-ponymail] branch master updated: Stricter date validation

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.git


The following commit(s) were added to refs/heads/master by this push:
     new 06fa1fe  Stricter date validation
06fa1fe is described below

commit 06fa1fe19386994e929aeab357aa1b2f52a45458
Author: Sebb <se...@apache.org>
AuthorDate: Thu Sep 5 12:27:12 2019 +0100

    Stricter date validation
---
 site/api/mbox.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/site/api/mbox.lua b/site/api/mbox.lua
index b6ab620..5d8223f 100644
--- a/site/api/mbox.lua
+++ b/site/api/mbox.lua
@@ -90,7 +90,7 @@ function handle(r)
     if get.list and get.date then
         local lid = ("<%s>"):format(get.list:gsub("@", "."):gsub("[<>]", ""))
         local flid = get.list:gsub("[.@]", "_")
-        local y, m = get.date:match("(%d+)%-(%d+)")
+        local y, m = get.date:match("^(%d+)%-(%d+)%")
         if not (y and m) then
             cross.contentType(r, "text/plain")
             r:puts("Wrong date format given!\n")