aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-10 19:02:00 -0700
committerfriendica <info@friendica.com>2014-09-10 19:02:00 -0700
commitde89bdc45f4a940e58694537ebb82a234f0f59d9 (patch)
treed2879160f61a52d0aa162c517e47cb77f9f94246 /include/items.php
parent6ab21b3d4f3b3cde6e967257490781815dbec103 (diff)
downloadvolse-hubzilla-de89bdc45f4a940e58694537ebb82a234f0f59d9.tar.gz
volse-hubzilla-de89bdc45f4a940e58694537ebb82a234f0f59d9.tar.bz2
volse-hubzilla-de89bdc45f4a940e58694537ebb82a234f0f59d9.zip
encrypt diaspora_meta since it may contain private message contents
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 415608eca..588cb934c 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2394,8 +2394,11 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id)
$x = array('signer' => $diaspora_handle, 'body' => $signed_body, 'signed_text' => $signed_text, 'signature' => base64_encode($authorsig));
+ $key = get_config('system','pubkey');
+ $y = crypto_encapsulate(json_encode($x),$key);
+
$r = q("update item set diaspora_meta = '%s' where id = %d limit 1",
- dbesc(json_encode($x)),
+ dbesc(json_encode($y)),
intval($post_id)
);