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

An empty signature will match all things #1083

Open
ross-spencer opened this issue Mar 29, 2024 · 1 comment
Open

An empty signature will match all things #1083

ross-spencer opened this issue Mar 29, 2024 · 1 comment

Comments

@ross-spencer
Copy link

Given the signature file:

<?xml version="1.0" encoding="UTF-8"?>
<FFSignatureFile xmlns="http://www.nationalarchives.gov.uk/pronom/SignatureFile" Version="1" DateCreated="2024-03-28T14:47:56+00:00">
  <InternalSignatureCollection>
  <InternalSignature ID="1" Specificity="Specific">
  <ByteSequence Reference="BOFoffset" />
</InternalSignature>
</InternalSignatureCollection>
<FileFormatCollection>
  <FileFormat ID="1" Name="ACME Generic Sequence of Bytes" PUID="ACME/1" Version="2600" MIMEType="x-application/acme">
    <InternalSignatureID>1</InternalSignatureID>
    <Extension>acme</Extension>
  </FileFormat>
</FileFormatCollection></FFSignatureFile>

When loaded into DROID and run against an arbitrary set of objects, DROID will return a signature identification for all objects.

I am not sure the impact on this in a larger dataset, and it may be unlikely that PRONOM will output a signature with this problem, but from a digital preservation standpoint it feels wrong and could cause some potential issues for folks.

@nishihatapalmer
Copy link
Contributor

An interesting edge case - from a purely mathematical standpoint, the empty string matches everything! I'm actually surprised that this does match everything though, didn't think it was possible to compile a matcher with no content, thought that would generate an exception.

Even so, if this ever happened, it would be obvious that there was a problem with the signature, and the signature would be fixed. Not sure this is worth spending any time fixing in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants