diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed091af3..c1f716e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# 4.3.1 (WIP) + +This minor release addresses some bugs discovered after deploying and tagging 4.3.0 + +* better isLoggedIn() check +* fix templates in sheets +* include onlyOffice version along with checkpoint hashes +* send feedback when opening the readme + * so we can decide whether to remove it +* handle decryption errors for blobs + * prompted by a badly formed sheet checkpoint +* fix broken team creation +* CKEditor + * broken table of contents scrollTo + * show the link bubble for links inside of comments +* fix title reset in polls + # 4.3.0 (D) ## Goals diff --git a/customize.dist/pages.js b/customize.dist/pages.js index ff2b90b40..a966da524 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -62,7 +62,7 @@ define([ var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? '/imprint.html' : AppConfig.imprint); - Pages.versionString = "v4.3.0"; + Pages.versionString = "v4.3.1"; // used for the about menu Pages.imprintLink = AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined; diff --git a/package-lock.json b/package-lock.json index 447f6a468..3b0286e25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cryptpad", - "version": "4.3.0", + "version": "4.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c059c6bd0..3b540387f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "4.3.0", + "version": "4.3.1", "license": "AGPL-3.0+", "repository": { "type": "git", diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 239bb138d..656ddf9f1 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -369,7 +369,8 @@ define([ content.hashes[i] = { file: data.url, hash: ev.hash, - index: ev.index + index: ev.index, + version: NEW_VERSION }; oldHashes = JSON.parse(JSON.stringify(content.hashes)); content.locks = {}; @@ -596,7 +597,13 @@ define([ if (arrayBuffer) { var u8 = new Uint8Array(arrayBuffer); FileCrypto.decrypt(u8, key, function (err, decrypted) { - if (err) { return void console.error(err); } + if (err) { + if (err === "DECRYPTION_ERROR") { + console.warn(err); + return void onCpError(err); + } + return void console.error(err); + } var blob = new Blob([decrypted.content], {type: 'plain/text'}); if (cb) { return cb(blob, getFileType()); @@ -890,7 +897,7 @@ define([ var handleNewLocks = function (o, n) { var hasNew = false; // Check if we have at least one new lock - Object.keys(n).some(function (id) { + Object.keys(n || {}).some(function (id) { if (typeof(n[id]) !== "object") { return; } // Ignore old format // n[id] = { uid: lock, uid2: lock2 }; return Object.keys(n[id]).some(function (uid) { @@ -902,7 +909,7 @@ define([ }); }); // Remove old locks - Object.keys(o).forEach(function (id) { + Object.keys(o || {}).forEach(function (id) { if (typeof(o[id]) !== "object") { return; } // Ignore old format Object.keys(o[id]).forEach(function (uid) { // Removed lock diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 530380746..629b10bc0 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -652,6 +652,7 @@ define([ if (data.expire) { pad.expire = data.expire; } if (data.password) { pad.password = data.password; } if (data.channel || secret) { pad.channel = data.channel || secret.channel; } + if (data.readme) { pad.readme = 1; } var s = getStore(data.teamId); if (!s || !s.manager) { return void cb({ error: 'ENOTFOUND' }); } @@ -839,6 +840,7 @@ define([ channel: channel, title: data.driveReadmeTitle, owners: [ store.proxy.edPublic ], + readme: true }; Store.addPad(clientId, fileData, cb); }, { @@ -1155,6 +1157,12 @@ define([ pad.owners = owners; } pad.expire = expire; + + if (pad.readme) { + delete pad.readme; + Feedback.send('OPEN_README'); + } + if (h.mode === 'view') { return; } // If we only have rohref, it means we have a stronger href diff --git a/www/poll/inner.js b/www/poll/inner.js index 5d31d917d..a65a7b1c8 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -1166,6 +1166,7 @@ define([ var $drawer = APP.toolbar.$drawer; metadataMgr.onChange(function () { + if (!APP.proxy) { return; } var md = copyObject(metadataMgr.getMetadata()); APP.proxy.metadata = md; }); @@ -1365,23 +1366,23 @@ define([ $('#cp-app-poll-comments-add-title').remove(); } - var rt = APP.rt = Listmap.create(listmapConfig); - APP.proxy = rt.proxy; + common.getPadAttribute('userid', function (e, userid) { + if (e) { console.error(e); } + var rt = APP.rt = Listmap.create(listmapConfig); + APP.proxy = rt.proxy; - var firstConnection = true; - rt.proxy.on('create', onCreate) - .on('ready', function (info) { - if (!firstConnection) { return; } // TODO fix this issue in listmap - firstConnection = false; - common.getPadAttribute('userid', function (e, userid) { - if (e) { console.error(e); } + var firstConnection = true; + rt.proxy.on('create', onCreate) + .on('ready', function (info) { + if (!firstConnection) { return; } // TODO fix this issue in listmap + firstConnection = false; APP.userid = userid; onReady(info, userid); - }); - }) - .on('disconnect', onDisconnect) - .on('reconnect', onReconnect) - .on('error', onError); + }) + .on('disconnect', onDisconnect) + .on('reconnect', onReconnect) + .on('error', onError); + }); }); }; main();