From aa8bb996783bb6ced999fa126b53c49cb44e82bd Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 28 Jul 2013 18:45:27 -0700 Subject: improve the red smiley --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 2d29dff31..dce927e80 100755 --- a/include/text.php +++ b/include/text.php @@ -887,7 +887,7 @@ function smilies($s, $sample = false) { ':facepalm', ':like', ':dislike', - 'red#', + 'red# the Red Matrix', '~friendica ~friendica' ); -- cgit v1.2.3 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 From 222fe08420802f7eacd4a544953f507d536c3fb8 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 1 Aug 2013 18:50:36 -0700 Subject: ensure that no unencrypted content leaks through item_store which is private - we typically do this in mod/item, but some functions bypass mod/item to create private posts --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 890355aea..66fa668a9 100755 --- a/include/text.php +++ b/include/text.php @@ -1258,7 +1258,7 @@ function feed_salmonlinks($nick) { function get_plink($item) { $a = get_app(); - if (x($item,'plink') && ($item['private'] != 1)) { + if (x($item,'plink') && ($item['item_private'] != 1)) { return array( 'href' => $item['plink'], 'title' => t('link to source'), -- cgit v1.2.3 From 27b4127f30cc40c4900298952db34ffd0e05cd2e Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 1 Aug 2013 19:18:05 -0700 Subject: pass item by reference so title can be altered --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 66fa668a9..814c564a3 100755 --- a/include/text.php +++ b/include/text.php @@ -977,7 +977,7 @@ function link_compare($a,$b) { -function prepare_body($item,$attach = false) { +function prepare_body(&$item,$attach = false) { $a = get_app(); -- cgit v1.2.3