From f665f9d3fb09bbccc546529e405a45be5d2cd4f4 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Tue, 8 Dec 2015 17:58:02 +0000 Subject: [PATCH] oops: White list canned attachments for realz --- include/class.canned.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/class.canned.php b/include/class.canned.php index 4ef801205..6bd2e99d0 100644 --- a/include/class.canned.php +++ b/include/class.canned.php @@ -134,6 +134,7 @@ extends VerySimpleModel { $resp['files'] = array(); foreach ($this->getAttachedFiles(!$html) as $file) { + $_SESSION[':cannedFiles'][$file->id] = 1; $resp['files'][] = array( 'id' => $file->id, 'name' => $file->name, @@ -146,9 +147,6 @@ extends VerySimpleModel { $resp['response'] = Format::html2text($resp['response'], 90); } - foreach ($resp['files'] as $f) - $_SESSION[':cannedFiles'][$f['file_id']] = 1; - return Format::json_encode($resp); break; case 'html': -- GitLab