Tweak recently added encryption functions to not violate ECMASCRIPT3 syntax

pull/307/merge
Thomas Bruederli 9 years ago
parent 0173302ce0
commit 310d4939ba

@ -3393,12 +3393,12 @@ function rcube_webmail()
mailvelope.getKeyring(keyring).then(function(kr) {
ref.mailvelope_keyring = kr;
ref.mailvelope_init(action, kr);
}).catch(function(err) {
}, function(err) {
// attempt to create a new keyring for this app/user
mailvelope.createKeyring(keyring).then(function(kr) {
ref.mailvelope_keyring = kr;
ref.mailvelope_init(action, kr);
}).catch(function(err) {
}, function(err) {
console.error(err);
});
});
@ -3526,7 +3526,7 @@ function rcube_webmail()
ref.remove_from_attachment_list(name);
});
}
}).catch(function(err) {
}, function(err) {
console.error(err);
console.log(options);
});
@ -3649,15 +3649,15 @@ function rcube_webmail()
form.submit();
}).catch(function(err) {
}, function(err) {
console.log(err);
}); // mailvelope_editor.encrypt()
}).catch(function(err) {
}, function(err) {
console.error(err);
}); // mailvelope_keyring.validKeyForAddress(senders)
}).catch(function(err) {
}, function(err) {
console.error(err);
}); // mailvelope_keyring.validKeyForAddress(recipients)
@ -3671,7 +3671,7 @@ function rcube_webmail()
$(selector).addClass('mailvelope').children().not('iframe').hide();
ref.hide_message(msgid);
setTimeout(function() { $(window).resize(); }, 10);
}).catch(function(err) {
}, function(err) {
console.error(err);
ref.hide_message(msgid);
ref.display_message('Message decryption failed: ' + err.message, 'error')
@ -3727,7 +3727,7 @@ function rcube_webmail()
if (missing_keys.length) {
ref.display_message(ref.get_label('nopubkeyfor').replace('$email', missing_keys.join(', ')), 'warning');
}
}, function() {
}).fail(function() {
console.error('Pubkey lookup failed with', arguments);
ref.hide_message(lock);
ref.display_message('pubkeysearcherror', 'error');
@ -3825,7 +3825,7 @@ function rcube_webmail()
btn.closest('.key').fadeOut();
ref.display_message(ref.get_label('keyimportsuccess').replace('$key', $key), 'confirmation');
}
}).catch(function(err) {
}, function(err) {
console.log(err);
});
});

@ -6,7 +6,7 @@
*/
var DEFAULT_KEYSERVERS = [
"https://keys.fedoraproject.org/",
"https://keybase.io/",
"https://keybase.io/"
];
/*
@ -280,7 +280,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
}]
};
@ -292,7 +292,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -306,7 +306,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -320,7 +320,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -334,7 +334,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -348,7 +348,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -362,7 +362,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
@ -375,7 +375,7 @@
"expirationdate": null,
"revoked": false,
"disabled": false,
"expired": false,
"expired": false
});
}
}
@ -422,7 +422,7 @@
"revoked": vals[6].indexOf("r") !== -1,
"disabled": vals[6].indexOf("d") !== -1,
"expired": vals[6].indexOf("e") !== -1,
"uids": [],
"uids": []
}
}
@ -435,7 +435,7 @@
"expirationdate": vals[3] === "" ? null : parseInt(vals[3]),
"revoked": vals[4].indexOf("r") !== -1,
"disabled": vals[4].indexOf("d") !== -1,
"expired": vals[4].indexOf("e") !== -1,
"expired": vals[4].indexOf("e") !== -1
});
}
}

Loading…
Cancel
Save