Giter Club home page Giter Club logo

Comments (6)

mistydemeo avatar mistydemeo commented on July 29, 2024

Fixed the misidentification bug that this exception exposed in #54.

from fido.

florianajir avatar florianajir commented on July 29, 2024

I have the same problem "invalid SRE code" for docx files,
fido say :

FIDO v1.3.1 (formats-v78.xml, container-signature-20130501.xml, format_extensions.xml)
invalid SRE code
OK,9,x-fmt/263,"ZIP Format","ZIP format",3734,"/home/fajir/test.docx","application/zip","signature"

Altough the first item (customized with the pronom puid as replace of fido-puid) has priority over x-fmt/263 in my conf/format_extensions.xml :

<format>
<puid>fmt/412</puid>
<name>Microsoft Office Open XML - Word</name>
<mime>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime>
<extension>docx</extension>
<has_priority_over>x-fmt/263</has_priority_over>
<has_priority_over>fmt/189</has_priority_over>
<signature>
<name>Microsoft Office Open XML - Word</name>
<pattern><position>BOF</position><regex>(?s)\APK\x03\x04</regex></pattern>
<pattern><position>BOF</position><regex>(?s)\A.{30}\[Content_Types\]\.xml \xa2</regex></pattern>
<pattern><position>EOF</position><regex>(?s)\x00\x00word/.{1,20}\.xmlPK\x01\x02\x2d.{0,2000}\Z</regex></pattern>
</signature>
</format>

from fido.

techmaurice avatar techmaurice commented on July 29, 2024

I noticed this bug too and working on a fix for "prepare.py", the script that generates the format.xml. This fix will calculate and rewrite repetitions over 65535 bytes, e.g:
.{8,65536}
becomes
.{8,65535}.{0,1}

Will do a pull request as soon as the fix is ready.

from fido.

mistydemeo avatar mistydemeo commented on July 29, 2024

Thanks! Would you also be able to merge #54? Independent of the regex, there's still an issue with the exception handling that could cause this to recur in the future.

from fido.

techmaurice avatar techmaurice commented on July 29, 2024

No problem, will merge #54 .

from fido.

techmaurice avatar techmaurice commented on July 29, 2024

By which I mean, will merge it before doing the pull request as I do not have admin rights anymore.

from fido.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.