You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-06 09:19:22 +02:00
All: Fixed crash when having invalid UTF-8 string in text editor
This commit is contained in:
@@ -101,7 +101,7 @@ class Command extends BaseCommand {
|
|||||||
this.releaseLockFn_ = null;
|
this.releaseLockFn_ = null;
|
||||||
|
|
||||||
// Lock is unique per profile/database
|
// Lock is unique per profile/database
|
||||||
const lockFilePath = osTmpdir() + '/synclock_' + md5(Setting.value('profileDir'));
|
const lockFilePath = osTmpdir() + '/synclock_' + md5(escape(Setting.value('profileDir'))); // https://github.com/pvorb/node-md5/issues/41
|
||||||
if (!await fs.pathExists(lockFilePath)) await fs.writeFile(lockFilePath, 'synclock');
|
if (!await fs.pathExists(lockFilePath)) await fs.writeFile(lockFilePath, 'synclock');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class MdToHtml {
|
|||||||
const r = resources[n];
|
const r = resources[n];
|
||||||
k.push(r.id);
|
k.push(r.id);
|
||||||
}
|
}
|
||||||
k.push(md5(body));
|
k.push(md5(escape(body))); // https://github.com/pvorb/node-md5/issues/41
|
||||||
k.push(md5(JSON.stringify(style)));
|
k.push(md5(JSON.stringify(style)));
|
||||||
k.push(md5(JSON.stringify(options)));
|
k.push(md5(JSON.stringify(options)));
|
||||||
return k.join('_');
|
return k.join('_');
|
||||||
|
|||||||
Reference in New Issue
Block a user