Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
add version 2.7.0 with fallback quoted printable decoding, in case re…
Browse files Browse the repository at this point in the history
…ading armored fails
  • Loading branch information
Barry de Graaff committed Feb 2, 2017
1 parent 1364286 commit 3269be5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For developers: http://barrydegraaff.github.io/OpenPGPZimletJSDoc/OpenPGPZimlet.

[root@myzimbra ~]# rm -Rf /opt/zimbra/zimlets-deployed/_dev/tk_barrydegraaff_zimbra_openpgp/
[root@myzimbra ~]# su zimbra
[zimbra@myzimbra ~] wget https://github.com/Zimbra-Community/pgp-zimlet/releases/download/2.6.9/tk_barrydegraaff_zimbra_openpgp.zip -O /tmp/tk_barrydegraaff_zimbra_openpgp.zip
[zimbra@myzimbra ~] wget https://github.com/Zimbra-Community/pgp-zimlet/releases/download/2.7.0/tk_barrydegraaff_zimbra_openpgp.zip -O /tmp/tk_barrydegraaff_zimbra_openpgp.zip
[zimbra@myzimbra ~] zmzimletctl deploy /tmp/tk_barrydegraaff_zimbra_openpgp.zip
[zimbra@myzimbra ~] zmmailboxdctl restart

Expand Down
14 changes: 11 additions & 3 deletions tk_barrydegraaff_zimbra_openpgp/tk_barrydegraaff_zimbra_openpgp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1436,9 +1436,17 @@ function(fArguments) {
document.getElementById("privateKeyInput").style.backgroundImage = "url('')";
this._dialog.setButtonVisible(DwtDialog.CANCEL_BUTTON, true);
this._dialog.setButtonVisible(DwtDialog.OK_BUTTON, true);
//Could not read armored message!
this.status(OpenPGPZimlet.lang[7], ZmStatusView.LEVEL_CRITICAL);
return;

try {
//one last final try..
var message = openpgp.message.readArmored(OpenPGPZimlet.prototype.quoted_printable_decode(fArguments['message']));
}
catch(err)
{
//Could not read armored message!
this.status(OpenPGPZimlet.lang[7], ZmStatusView.LEVEL_CRITICAL);
return;
}
}
try {
var publicKeys1 = openpgp.key.readArmored(this.getUserPropertyInfo("zimbra_openpgp_pubkeys1").value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.6.9" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.7.0" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<summary>
Zimbra OpenPGP Zimlet

Expand Down

0 comments on commit 3269be5

Please sign in to comment.