Skip to content

Fix: Add XLSX signature to MicrosoftOffice365Document (fixes #59)#60

Open
AndrewNowosad wants to merge 1 commit into
AJMitev:masterfrom
AndrewNowosad:fix/issue-59-xlsx-signature
Open

Fix: Add XLSX signature to MicrosoftOffice365Document (fixes #59)#60
AndrewNowosad wants to merge 1 commit into
AJMitev:masterfrom
AndrewNowosad:fix/issue-59-xlsx-signature

Conversation

@AndrewNowosad

Copy link
Copy Markdown
Contributor

Description

This PR adds a missing XLSX file signature to the MicrosoftOffice365Document class.

Problem

XLSX files with the signature 50 4B 03 04 14 00 06 08 08 00 were being incorrectly identified as ZIP files instead of XLSX files.

Solution

Added the signature 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x08, 0x08, 0x00 to the list of recognized Office 365 document signatures in the MicrosoftOffice365Document class. Added a test fixture (test-issue-59.xlsx, a small synthetic file built to reproduce exactly this local file header) and a corresponding test case.

Fixes

Fixes #59

Add the signature 50 4B 03 04 14 00 06 08 08 00 to the list of recognized
Office 365 document signatures. This signature is used by some XLSX files
(e.g. saved by non-Microsoft editors) and should be recognized as XLSX
instead of generic ZIP files.

Fixes AJMitev#59
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

Successfully merging this pull request may close these issues.

Another XLSX signature: 50 4b 03 04 14 00 06 08 08 00

1 participant