From c168393c21559d785fbd8e8938eb457a8bf553e9 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 19 Mar 2021 17:14:40 +0100 Subject: [PATCH] Only allow driveless mode for existing pads --- www/common/sframe-common-outer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 77aa9ba43..e74fb882c 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -221,8 +221,11 @@ define([ } } catch (e) { console.error(e); } + // NOTE: Driveless mode should only work for existing pads, but we can't check that + // before creating the worker because we need the anon RPC to do so. + // We're only going to check if a hash exists in the URL or not. Cryptpad.ready(waitFor(), { - noDrive: cfg.noDrive && AppConfig.allowDrivelessMode, + noDrive: cfg.noDrive && AppConfig.allowDrivelessMode && currentPad.hash, driveEvents: cfg.driveEvents, cache: Boolean(cfg.cache), currentPad: currentPad