logoalt Hacker News

wingmanjdyesterday at 1:19 AM2 repliesview on HN

Since docx files are similar to a zip file with the extension changed, could this trick fake out Microsoft Word?


Replies

JdeBPyesterday at 8:32 AM

It's an interesting hole that the test cases don't cover any of Microsoft Office, Windows Explorer, PowerShell's various cmdlets, or the several major .NET ZIP archive libraries. It would seem that the author just does not use Microsoft Windows.

There's a whole extra level of archive file format tooling gotchas that one misses out on when one assumes "UNIX" for everything, and does not account for "FAT", "NTFS", "HPFS", and even "OpenVMS".

Or ZIP64. (-:

* https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...

* https://github.com/mihula/ProDotNetZip/blob/main/src/Zip/Zip...

mlyleyesterday at 1:39 AM

The trick depends upon different implementations doing different things. Not likely for Word (though I suppose it is -possible- across different versions or different OSes).

show 2 replies