Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify issues with case insensitive digests resulting in repeated digests #461

Closed
zimeon opened this issue May 5, 2020 · 5 comments
Closed

Comments

@zimeon
Copy link
Contributor

zimeon commented May 5, 2020

Consider https://github.com/OCFL/fixtures/tree/master/1.0/bad-objects/bad16_digest_repeated which has inventory:

{
  "digestAlgorithm": "sha512",
  "head": "v1",
  "id": "ark:123/abc",
  "manifest": {
    "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e": [
      "v1/content/empty1"
    ],
    "CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E": [
      "v1/content/empty2"
    ]
  },
  "type": "https://ocfl.io/1.0/spec/#inventory",
  "versions": {
    "v1": {
      "created": "2019-01-01T02:03:04Z",
      "message": "Example with two empty files that thus have the same digest but are represented with different normalizations",
      "state": {
        "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e": [
          "empty1"
        ],
        "CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E": [
          "empty2"
        ]
      }
    }
  }
}

the digests are actually the same but in both manifest and state one is in uppercase and the other in lowercase. This could be allowed (should be text explaining merge after normalization) or it could be forbidden (what I'd assumed, should be text explaining that different normalizations MUST not result in repeated digests)

@zimeon
Copy link
Contributor Author

zimeon commented May 5, 2020

See #437 where we decided to keep case insensitivity

@zimeon zimeon added this to the 1.0 milestone May 12, 2020
@awoods
Copy link
Member

awoods commented May 12, 2020

Given the previous decision (#437 (comment)), do we want to add "text explaining merge after normalization", or do nothing?

@zimeon
Copy link
Contributor Author

zimeon commented May 13, 2020

I'm inclined to require consistent normalization within a single inventory.json but I think we have to add explanation either way

@neilsjefferies
Copy link
Member

neilsjefferies commented May 13, 2020

As per Community Call 13/5 - digest should occur once within a manifest regardless of case

@zimeon
Copy link
Contributor Author

zimeon commented May 19, 2020

Closed by #468 and #469

@zimeon zimeon closed this as completed May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants