diff --git a/client/components/Reader/versionHistory.js b/client/components/Reader/versionHistory.js index 1ea73e5c..7cff0475 100644 --- a/client/components/Reader/versionHistory.js +++ b/client/components/Reader/versionHistory.js @@ -7,6 +7,7 @@ export const versionHistory = [ ` }, diff --git a/server/core/FileDetector/index.js b/server/core/FileDetector/index.js index 21baa109..796f0845 100644 --- a/server/core/FileDetector/index.js +++ b/server/core/FileDetector/index.js @@ -4,7 +4,7 @@ const signatures = require('./signatures.json'); class FileDetector { detectFile(filename) { return new Promise((resolve, reject) => { - this.fromFile(filename, 2000, (err, result) => { + this.fromFile(filename, 10000, (err, result) => { if (err) reject(err); resolve(result); }); diff --git a/server/core/FileDetector/signatures.json b/server/core/FileDetector/signatures.json index 00219c36..523b1d74 100644 --- a/server/core/FileDetector/signatures.json +++ b/server/core/FileDetector/signatures.json @@ -662,31 +662,6 @@ ] }, - { - "type": "html", - "ext": "html", - "mime": "text/html", - "rules": [ - { "type": "or", "rules": - [ - { "type": "contains", "bytes": "3c68746d6c" }, - { "type": "contains", "bytes": "3c00680074006d006c00" }, - { "type": "equal", "end": 5, "bytes": "3c68746d6c" }, - { "type": "equal", "end": 10, "bytes": "3c00680074006d006c00" }, - { "type": "equal", "end": 9, "bytes": "3c21646f6374797065" }, - { "type": "equal", "end": 5, "bytes": "3c626f6479" }, - { "type": "equal", "end": 5, "bytes": "3c68656164" }, - { "type": "equal", "end": 7, "bytes": "3c696672616d65" }, - { "type": "equal", "end": 4, "bytes": "3c696d67" }, - { "type": "equal", "end": 7, "bytes": "3c6f626a656374" }, - { "type": "equal", "end": 7, "bytes": "3c736372697074" }, - { "type": "equal", "end": 6, "bytes": "3c7461626c65" }, - { "type": "equal", "end": 6, "bytes": "3c7469746c65" } - ] - } - ] - }, - { "type": "docx", "ext": "docx", @@ -721,6 +696,35 @@ "rules": [ { "type": "equal", "start": 64, "end": 68, "bytes": "4d4f4249" } ] + }, + + { + "type": "html", + "ext": "html", + "mime": "text/html", + "rules": [ + { "type": "or", "rules": + [ + { "type": "contains", "bytes": "3c68746d6c" }, + { "type": "contains", "bytes": "3c00680074006d006c00" }, + { "type": "contains", "bytes": "3c48544d4c" }, + { "type": "contains", "bytes": "3c00480054004d004c00" }, + + { "type": "equal", "end": 5, "bytes": "3c68746d6c" }, + { "type": "equal", "end": 10, "bytes": "3c00680074006d006c00" }, + { "type": "equal", "end": 9, "bytes": "3c21646f6374797065" }, + { "type": "equal", "end": 9, "bytes": "3c21444f4354595045" }, + { "type": "equal", "end": 5, "bytes": "3c626f6479" }, + { "type": "equal", "end": 5, "bytes": "3c68656164" }, + { "type": "equal", "end": 7, "bytes": "3c696672616d65" }, + { "type": "equal", "end": 4, "bytes": "3c696d67" }, + { "type": "equal", "end": 7, "bytes": "3c6f626a656374" }, + { "type": "equal", "end": 7, "bytes": "3c736372697074" }, + { "type": "equal", "end": 6, "bytes": "3c7461626c65" }, + { "type": "equal", "end": 6, "bytes": "3c7469746c65" } + ] + } + ] } ]