From b30e2af282a291dfb9bac07d1d68cdaa186b24cc Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Mon, 7 Mar 2016 09:11:35 -0800 Subject: [PATCH] require exact signature match; stop with .lower() was comparing for case insensitive matches when locating signatures; probably a bad idea; better to simply require an exact match --- tldp/doctypes/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tldp/doctypes/common.py b/tldp/doctypes/common.py index 8893717..f2eeca3 100644 --- a/tldp/doctypes/common.py +++ b/tldp/doctypes/common.py @@ -44,10 +44,10 @@ class SignatureChecker(object): @classmethod def signatureLocation(cls, f): f.seek(0) - buf = f.read(1024).lower() + buf = f.read(1024) for sig in cls.signatures: try: - sindex = buf.index(sig.lower()) + sindex = buf.index(sig) logger.debug("YES FOUND signature %r in %s at %s; doctype %s.", sig, f.name, sindex, cls) return sindex