On 4/3/2014 12:46 AM, Andy Bradford wrote:
Thus said Andy Goth on Wed, 02 Apr 2014 21:37:35 -0500:
When the UUID is abbreviated to one or two characters, the ambiguous
artifact page is bypassed, and it always seems to link to a ticket.

It appears that if you happen to have a ticket UUID/SHA1 that just
happens to match the beginning part of another artifact, the ticket
will always win out.  It's hard to test this because it needs a
collision of at least length 4 between a ticket and a checkin.

Ask and ye shall receive:

http://www.fossil-scm.org/index.html/info/6b8e
http://www.fossil-scm.org/index.html/info/6b8e09987a847440a2ebf772e4ddcb62c447306a
http://www.fossil-scm.org/index.html/info/6b8e355d943a34507eea564ff7ecdcb2a0075d11
http://www.fossil-scm.org/index.html/info/6b8e82544dfc4e88297c8808b11712f1f334039e
http://www.fossil-scm.org/index.html/info/6b8ef6a4fd5610f5f0cc648c59511d6e3b78620c
http://www.fossil-scm.org/index.html/info/6b8ee7d40d5d7430e4ba816c888a73ba92f3eb2e

And another test set which includes two tickets:

http://www.fossil-scm.org/index.html/info/2898
http://www.fossil-scm.org/index.html/info/28987096acb2fd6a88b9869ec9f07477b1af6ce0
http://www.fossil-scm.org/index.html/info/289844a2cb535a465c4d956f9907e5b3762d2193
http://www.fossil-scm.org/index.html/info/289890d62b25566652f985cf5ca6bc87ffe69598

Here's a sample query for finding such collisions:

  SELECT *
    FROM (SELECT uuid    , 'blob'   FROM blob
UNION ALL SELECT tkt_uuid, 'ticket' FROM ticket)
   WHERE substr(uuid, 1, 4)
       = (SELECT substr(uuid, 1, 4) AS prefix
            FROM blob
           WHERE prefix in (SELECT substr(tkt_uuid, 1, 4) FROM ticket)
        GROUP BY prefix
          HAVING count(*) > 1
        ORDER BY count(*) DESC
           LIMIT 1);

--
Andy Goth | <andrew.m.goth/at/gmail/dot/com>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to