From eb3e650361af6afac1be0d712d3e9e050ae4cdc5 Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 29 Sep 2021 23:40:57 +1000 Subject: [PATCH] removed broken MSI support 0uo --- CHANGELOG.md | 5 +++-- Cargo.lock | 2 -- src/mime_db.rs | 8 +++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a7642..e9adead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased -### Added - - MSI detection to [`infer`] backend + +--- + ## v0.3.7 - 2021-09-25 ### Added - `-j`/`--jobs` flag for specifying the number of threads fif should use for scanning files diff --git a/Cargo.lock b/Cargo.lock index c3bd0f9..693dfa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,7 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - [[package]] name = "arrayvec" version = "0.5.2" diff --git a/src/mime_db.rs b/src/mime_db.rs index 1482ef8..53b94cd 100644 --- a/src/mime_db.rs +++ b/src/mime_db.rs @@ -51,9 +51,11 @@ cfg_if! { buf.starts_with(b"\x46\x4f\x52\x4d\x41\x49\x46\x46") }); - info.add("application/x-msi", "msi", |buf| { - buf.starts_with(b"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1") - }); + // info.add("application/x-msi", "msi", |buf| { + // TODO: find a way to detect MSI files properly - this just detects those weird windows OLE files and therefore + // also picks up on .doc files + // buf.starts_with(b"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1") + // }); info.add("image/svg+xml", "svg", |buf| { // before doing the moderately expensive SVG check, we should make sure that the input is actually SGML-ish,