Merge branch 'soon' into staging

pull/1/head
ansuz 5 years ago
commit adc29e8b42

@ -1552,9 +1552,6 @@ define([
var common = config.common;
var hasFriends = Object.keys(config.friends || {}).length !== 0;
if (!hasFriends) {
return void UI.alert(Messages.team_noFriend);
}
var privateData = common.getMetadataMgr().getPrivateData();
var team = privateData.teams[config.teamId];
if (!team) { return void UI.warn(Messages.error); }

@ -43,10 +43,20 @@ define([
var c = Crypto.createEncryptor(key);
cryptor.encrypt = function (href) {
// Never encrypt blob href, they are always read-only
if (href.slice(0,7) === '/file/#') { return href; }
return c.encrypt(href);
try {
if (href.slice(0,7) === '/file/#') { return href; }
return c.encrypt(href);
} catch (e) {
return;
}
};
cryptor.decrypt = function (msg) {
try {
return c.decrypt(msg);
} catch (e) {
return;
}
};
cryptor.decrypt = c.decrypt;
} catch (e) {
console.error(e);
}

Loading…
Cancel
Save