Only allow driveless mode for existing pads

This commit is contained in:
yflory 2021-03-19 17:14:40 +01:00
parent 18e995f63a
commit c168393c21

View file

@ -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