From ed1d212ae2daea5e4bd043417610177093e99f19 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 16 Jan 2016 03:03:51 -0500
Subject: [PATCH] Improved SVG cleanup code
---
plugins/enigma/lib/enigma_engine.php | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index 249a4b0..b95ed1a 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -444,14 +444,16 @@
*/
private function parse_plain_signed(&$p, $body)
{
+ if (!$this->rc->config->get('enigma_signatures', true)) {
+ return;
+ }
+
$this->load_pgp_driver();
$part = $p['structure'];
// Verify signature
- if ($this->rc->action == 'show' || $this->rc->action == 'preview') {
- if ($this->rc->config->get('enigma_signatures', true)) {
- $sig = $this->pgp_verify($body);
- }
+ if ($this->rc->action == 'show' || $this->rc->action == 'preview' || $this->rc->action == 'print') {
+ $sig = $this->pgp_verify($body);
}
// @TODO: Handle big bodies using (temp) files
@@ -505,7 +507,7 @@
return;
}
- if ($this->rc->action != 'show' && $this->rc->action != 'preview') {
+ if ($this->rc->action != 'show' && $this->rc->action != 'preview' && $this->rc->action != 'print') {
return;
}
@@ -552,7 +554,7 @@
}
// Verify signature
- if ($this->rc->action == 'show' || $this->rc->action == 'preview') {
+ if ($this->rc->action == 'show' || $this->rc->action == 'preview' || $this->rc->action == 'print') {
$this->load_smime_driver();
$struct = $p['structure'];
--
Gitblit v1.9.1