mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Add additional logging for OpenPGP
Remove enforcing lower case for email addresses Small fixes
This commit is contained in:
parent
436e54891e
commit
3498700f61
11 changed files with 89 additions and 17 deletions
|
|
@ -124,11 +124,10 @@
|
|||
{
|
||||
var
|
||||
oE = null,
|
||||
oLink = null,
|
||||
sUserAgent = window.navigator.userAgent.toLowerCase()
|
||||
oLink = null
|
||||
;
|
||||
|
||||
if (sUserAgent && (sUserAgent.indexOf('chrome') > -1 || sUserAgent.indexOf('chrome') > -1))
|
||||
if (Globals.sUserAgent && (Globals.sUserAgent.indexOf('chrome') > -1 || Globals.sUserAgent.indexOf('chrome') > -1))
|
||||
{
|
||||
oLink = window.document.createElement('a');
|
||||
oLink['href'] = sLink;
|
||||
|
|
|
|||
|
|
@ -1383,7 +1383,14 @@
|
|||
|
||||
if (window.Worker)
|
||||
{
|
||||
PgpStore.openpgp.initWorker(Links.openPgpWorkerJs());
|
||||
try
|
||||
{
|
||||
PgpStore.openpgp.initWorker(Links.openPgpWorkerJs());
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
};
|
||||
}
|
||||
|
||||
// PgpStore.openpgp.config.useWebCrypto = false;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
PgpStore = require('Stores/User/Pgp'),
|
||||
|
||||
AbstractModel = require('Knoin/AbstractModel')
|
||||
|
|
@ -58,8 +60,11 @@
|
|||
return oKey.keys;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -301,7 +301,16 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
var oMessage = self.openpgp.message.readArmored(sData);
|
||||
var oMessage = null;
|
||||
try
|
||||
{
|
||||
oMessage = self.openpgp.message.readArmored(sData);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
};
|
||||
|
||||
if (oMessage && oMessage.getText && oMessage.verify && oMessage.decrypt)
|
||||
{
|
||||
self.decryptMessage(oMessage, function (oValidPrivateKey, oDecriptedMessage, oValidPublicKey, aSigningKeyIds) {
|
||||
|
|
@ -361,7 +370,16 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
var oMessage = self.openpgp.cleartext.readArmored(sData);
|
||||
var oMessage = null;
|
||||
try
|
||||
{
|
||||
oMessage = self.openpgp.cleartext.readArmored(sData);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
};
|
||||
|
||||
if (oMessage && oMessage.getText && oMessage.verify)
|
||||
{
|
||||
self.verifyMessage(oMessage, function (oValidKey, aSigningKeyIds) {
|
||||
|
|
|
|||
|
|
@ -389,7 +389,6 @@ html.rl-no-preview-pane {
|
|||
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||
display: block;
|
||||
max-width: 700px;
|
||||
white-space: pre;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
|
|
@ -407,7 +406,6 @@ html.rl-no-preview-pane {
|
|||
border: none;
|
||||
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||
display: block;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre.b-plain-openpgp {
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@
|
|||
}
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
|
||||
self.notification(Translator.i18n('PGP_NOTIFICATIONS/PGP_ERROR', {
|
||||
'ERROR': '' + e
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
}
|
||||
catch (e)
|
||||
{
|
||||
Utils.log(e);
|
||||
self.submitRequest(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue