GitHub user sebbASF opened an issue:

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

    Bug: shortLinks are not guaranteed unique, especially with the original 
generator

    The shortLink feature works by truncating the database message id to 18 
charactes and then converting it to base 36. To recover a message, the short 
link is decoded, and the first matching mail with the same prefix is returned.
    
    In the case of the original generator, the first 18 characters of the id 
only depend on the message body. If the same message is sent to multiple 
mailing lists, they will all have the same shortLink. However only one will 
ever be retrieved currently.
    
    In the case of the "medium" generator, the first 18 characters are part of 
a sha256 hash which will be unique within the database. There are billions of 
hashes with the same prefix, however the chances of two having the same prefix 
should be very small, but not impossible.
    
    One solution is to ensure that shortLinks return all matching messages 
rather than just the first 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