zimeon / ocfl-py

OCFL tools in Python
MIT License
20 stars 6 forks source link

Correctly handle validation with multiple entries for a given digest in `manifest` #52

Closed zimeon closed 3 years ago

zimeon commented 3 years ago

See error case https://github.com/OCFL/fixtures/pull/78

zimeon commented 3 years ago

This should be detected early-on in the parsing of the manifest:

  "manifest": {
    "24f950aac7b9ea9b3cb728228a0c82b67c39e96b4b344798870d5daee93e3ae5931baae8c7cacfea4b629452c38026a81d138bc7aad1af3ef7bfd5ec646d6c28": [
      "v1/content/test.txt", "v1/content/test-copy.txt", "v1/content/test.txt"
    ]
  },
zimeon commented 3 years ago

From spec, E101:

Within an inventory, content paths MUST be unique and non-conflicting, so the content path for a file cannot appear as the initial part of another content path.

so this should apply to both the case of a repeated path for one digest, and a repeated path given for another digest (one instance of which would have to have an incorrect digest too)

zimeon commented 3 years ago

Fixed in 1.2.2