From 27797c052060aae22a1bd8faa5c9f4a5d289cf24 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 2 Jul 2018 10:50:30 +0200 Subject: [PATCH 1/3] Fix undefined secret with password-protected files (#250) --- www/common/sframe-common-outer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 8b30aa2e2..459d9bc73 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -188,13 +188,13 @@ define([ if (val) { password = val; - Cryptpad.getFileSize(window.location.href, password, function (e, size) { + Cryptpad.getFileSize(window.location.href, password, waitFor(function (e, size) { if (size !== 0) { return void todo(); } // Wrong password or deleted file? askPassword(true); - }); + })); } else { askPassword(); } From af5cc30381b68f67d2cb1c08c4da22b6f301780e Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 2 Jul 2018 10:51:27 +0200 Subject: [PATCH 2/3] Fix undefined function when calling error() in the drive --- www/common/userObject.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index fb39eb484..d97607c1a 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -37,7 +37,14 @@ define([ var logError = config.logError || logging; var debug = exp.debug = config.debug || logging; var error = exp.error = function() { - exp.fixFiles(); + if (sframeChan) { + return void sframeChan.query("Q_DRIVE_USEROBJECT", { + cmd: "fixFiles", + data: {} + }, function () {}); + } else if (typeof (exp.fixFiles) === "function") { + exp.fixFiles(); + } console.error.apply(console, arguments); }; From 846755b0a7fb17c175ce6e38827d82d10f8d85eb Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 2 Jul 2018 14:02:05 +0200 Subject: [PATCH 3/3] Increase requirejs timeout (thanks Firefox...) --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 02cb54029..17e793f29 100644 --- a/server.js +++ b/server.js @@ -165,7 +165,7 @@ app.get('/api/config', function(req, res){ res.send('define(function(){\n' + [ 'var obj = ' + JSON.stringify({ requireConf: { - waitSeconds: 60, + waitSeconds: 600, urlArgs: 'ver=' + Package.version + (FRESH_KEY? '-' + FRESH_KEY: '') + (DEV_MODE? '-' + (+new Date()): ''), }, removeDonateButton: (config.removeDonateButton === true),