GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/221

    Bug: pminfo.lua is not self-consistent; rejects valid list names

    pminfo.lua can return inconsistent data, for example:
    
    
```{"no_threads":18,"participants":5,"active_lists":{},"no_active_lists":0,"hits":28,...```
    
    It does not make sense to have 28 messages and 18 threads if there are no 
active lists.
    
    This is caused by the following list/domain name validation:
    
    ```if not domain:match("%..-%..-%..-") and domain:match("^[-_a-z0-9.]+$") 
and list:match("^[-_a-z0-9.]+$") then```
    
    which is only applied when processing the active lists.
    
    Is there really a need to validate the list names here?
    If so, then the other statistics need adjusting accordingly.
    Assuming the validation is needed, then it should be done using a common 
utility method (DRY) and should not reject list names such as 
    [email protected]
    This currently fails the check: 
    ```not domain:match("%..-%..-%..-")'```

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to