From 07ed884f044c3f6bf580fe06bdc718894ea87ac7 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 8 Jun 2021 11:14:20 +0200 Subject: [PATCH] Fix password-protected files --- www/common/sframe-common-outer.js | 2 +- www/file/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 198d17099..cbfc3ab18 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -570,7 +570,7 @@ define([ var defaultTitle = Utils.UserObject.getDefaultName(parsed); var edPublic, curvePublic, notifications, isTemplate; var settings = {}; - var isSafe = ['debug', 'profile', 'drive', 'teams', 'calendar'].indexOf(currentPad.app) !== -1; + var isSafe = ['debug', 'profile', 'drive', 'teams', 'calendar', 'file'].indexOf(currentPad.app) !== -1; var isDeleted = isNewFile && currentPad.hash.length > 0; if (isDeleted) { diff --git a/www/file/main.js b/www/file/main.js index c4309692f..e0165ff81 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -15,8 +15,8 @@ define([ href = obj.href; hash = obj.hash; }).nThen(function (/*waitFor*/) { - var addData = function (meta, Cryptpad) { - meta.filehash = Cryptpad.currentPad.hash; + var addData = function (meta, Cryptpad, user, Utils) { + meta.filehash = Utils.currentPad.hash; }; SFCommonO.start({ cache: true,