From cd91541245f0add4970a50f43959bfc45d749ff0 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 15 Apr 2020 16:35:05 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20"=D0=9D=D0=B5=20=D1=83?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=BE=D1=81=D1=8C=20=D0=BE=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=8C=20=D1=84=D0=BE=D1=80=D0=BC?= =?UTF-8?q?=D0=B0=D1=82=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0"=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B5=20htm?= =?UTF-8?q?l-=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/FileDetector/index.js | 2 +- server/core/FileDetector/signatures.json | 54 +++++++++++++----------- 2 files changed, 30 insertions(+), 26 deletions(-) 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" } + ] + } + ] } ] From c1712bebc63c43248c1c1cbc370b13ab7cd3a8fa Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 15 Apr 2020 16:36:29 +0700 Subject: [PATCH 2/2] 0.9.2-1 --- client/components/Reader/versionHistory.js | 1 + 1 file changed, 1 insertion(+) 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 = [ ` },