fix migration, closes #4262

This commit is contained in:
zadam 2023-09-18 23:45:00 +02:00
parent 4a67f63abd
commit 8075265753
3 changed files with 12 additions and 8 deletions

14
package-lock.json generated
View file

@ -47,7 +47,7 @@
"jimp": "0.22.10",
"joplin-turndown-plugin-gfm": "1.0.12",
"jsdom": "22.1.0",
"marked": "9.0.0",
"marked": "9.0.3",
"mime-types": "2.1.35",
"multer": "1.4.5-lts.1",
"node-abi": "3.47.0",
@ -8946,9 +8946,9 @@
}
},
"node_modules/marked": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.0.0.tgz",
"integrity": "sha512-37yoTpjU+TSXb9OBYY5n78z/CqXh76KiQj9xsKxEdztzU9fRLmbWO5YqKxgCVGKlNdexppnbKTkwB3RipVri8w==",
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.0.3.tgz",
"integrity": "sha512-pI/k4nzBG1PEq1J3XFEHxVvjicfjl8rgaMaqclouGSMPhk7Q3Ejb2ZRxx/ZQOcQ1909HzVoWCFYq6oLgtL4BpQ==",
"bin": {
"marked": "bin/marked.js"
},
@ -19990,9 +19990,9 @@
"requires": {}
},
"marked": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.0.0.tgz",
"integrity": "sha512-37yoTpjU+TSXb9OBYY5n78z/CqXh76KiQj9xsKxEdztzU9fRLmbWO5YqKxgCVGKlNdexppnbKTkwB3RipVri8w=="
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.0.3.tgz",
"integrity": "sha512-pI/k4nzBG1PEq1J3XFEHxVvjicfjl8rgaMaqclouGSMPhk7Q3Ejb2ZRxx/ZQOcQ1909HzVoWCFYq6oLgtL4BpQ=="
},
"matcher": {
"version": "3.0.0",

View file

@ -68,7 +68,7 @@
"jimp": "0.22.10",
"joplin-turndown-plugin-gfm": "1.0.12",
"jsdom": "22.1.0",
"marked": "9.0.0",
"marked": "9.0.3",
"mime-types": "2.1.35",
"multer": "1.4.5-lts.1",
"node-abi": "3.47.0",

View file

@ -25,6 +25,10 @@ function md5(content) {
}
function hashedBlobId(content) {
if (content === null || content === undefined) {
content = "";
}
// sha512 is faster than sha256
const base64Hash = crypto.createHash('sha512').update(content).digest('base64');