|
|
|
@ -467,7 +467,7 @@ define([
|
|
|
|
|
currentPad.href = parsed.getUrl(opts);
|
|
|
|
|
currentPad.hash = parsed.hashData && parsed.hashData.getHash(opts);
|
|
|
|
|
}
|
|
|
|
|
Cryptpad.getPadAttribute('title', w(function (err, data) {
|
|
|
|
|
Cryptpad.getPadAttribute('channel', w(function (err, data) {
|
|
|
|
|
stored = (!err && typeof (data) === "string");
|
|
|
|
|
}));
|
|
|
|
|
Cryptpad.getPadAttribute('password', w(function (err, val) {
|
|
|
|
@ -478,6 +478,11 @@ define([
|
|
|
|
|
passwordCfg.value = newPadPassword;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Pad not stored && password required: always ask for the password
|
|
|
|
|
if (!stored && parsed.hashData.password) {
|
|
|
|
|
return void askPassword(true, passwordCfg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (parsed.type === "file") {
|
|
|
|
|
// `isNewChannel` doesn't work for files (not a channel)
|
|
|
|
|
// `getFileSize` is not adapted to channels because of metadata
|
|
|
|
@ -503,10 +508,6 @@ define([
|
|
|
|
|
waitFor.abort();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!stored && !parsed.hashData.password) {
|
|
|
|
|
// We've received a link without /p/ and it doesn't work without a password: abort
|
|
|
|
|
return void todo();
|
|
|
|
|
}
|
|
|
|
|
// Wrong password or deleted file?
|
|
|
|
|
askPassword(true, passwordCfg);
|
|
|
|
|
}));
|
|
|
|
|