You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by sebbASF <gi...@git.apache.org> on 2016/10/06 11:18:30 UTC

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by Humbedooh <gi...@git.apache.org>.
Github user Humbedooh commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    old shortlinks should work, the new ones and the old ones use different markers to denote which generator was used, and the new JS knows this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by Humbedooh <gi...@git.apache.org>.
Github user Humbedooh commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    IIRC, the chance of colliding two shortlinks with the new generator is 1:10^33.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    However, any installations that used the original generator will include duplicates, e.g. for messages sent to multiple lists. So the code must still support duplicates.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    Old shortlinks will work in the sense that they will find a match.
    However they won't work in the sense that they find the right match.
    The old shortlinks effectively threw away all but the body hash when applied to the original ids.
    Since the body hash is far from unique, the old shortlinks were also not unique.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    It's good that the new shortlinks are statistically unlikely to be duplicated.
    
    However if the old shortlink generator was ever used to shorten original ids in anything other than a test installation, then it will have published ambiguous short links. These need to be allowed for.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #178: Bug: shortLinks are not guaranteed unique, es...

Posted by Humbedooh <gi...@git.apache.org>.
Github user Humbedooh commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/178
  
    The new shortlink generator only allows shortlinks for IDs made by the newer generators (it checks). if the old is used, it falls back to full IDs for everything.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---