From de89bdc45f4a940e58694537ebb82a234f0f59d9 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 10 Sep 2014 19:02:00 -0700 Subject: encrypt diaspora_meta since it may contain private message contents --- include/items.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/items.php') 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) ); -- cgit v1.2.3