From d002ff668aee672d7a49cd744d6797eb616b9152 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 28 Jul 2013 21:04:03 -0700 Subject: encrypt private messages on disk - there are still a couple of places where the text is leaked in the logs during processing. --- include/text.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index dce927e80..890355aea 100755 --- a/include/text.php +++ b/include/text.php @@ -980,8 +980,19 @@ function link_compare($a,$b) { function prepare_body($item,$attach = false) { $a = get_app(); + + + call_hooks('prepare_body_init', $item); + if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED)) { + $key = get_config('system','prvkey'); + if($item['title']) + $item['title'] = aes_unencapsulate(json_decode($item['title'],true),$key); + if($item['body']) + $item['body'] = aes_unencapsulate(json_decode($item['body'],true),$key); + } + $s = prepare_text($item['body'],$item['mimetype']); $prep_arr = array('item' => $item, 'html' => $s); @@ -992,6 +1003,7 @@ function prepare_body($item,$attach = false) { return $s; } + $arr = json_decode($item['attach'],true); if(count($arr)) { $s .= '
'; -- cgit v1.2.3