aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-28 21:04:03 -0700
committerfriendica <info@friendica.com>2013-07-28 21:04:03 -0700
commitd002ff668aee672d7a49cd744d6797eb616b9152 (patch)
tree01044d6e4788ad9867d57d2c475973a43d368961 /include/text.php
parent10f016841c612c6cef86cff91f45baea74c5d3d6 (diff)
downloadvolse-hubzilla-d002ff668aee672d7a49cd744d6797eb616b9152.tar.gz
volse-hubzilla-d002ff668aee672d7a49cd744d6797eb616b9152.tar.bz2
volse-hubzilla-d002ff668aee672d7a49cd744d6797eb616b9152.zip
encrypt private messages on disk - there are still a couple of places where the text is leaked in the logs during processing.
Diffstat (limited to 'include/text.php')
-rwxr-xr-xinclude/text.php12
1 files changed, 12 insertions, 0 deletions
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 .= '<div class="body-attach">';