aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-21 14:54:34 -0800
committerredmatrix <git@macgirvin.com>2016-02-21 14:54:34 -0800
commit411abdf8a74a7e6cb1914fd0d9545dd40b75544c (patch)
tree8d92879bca46238526e942022cfbf9d1974f9c8c
parentdfbe2eaf9856140de84f4d891fd442cdd6872545 (diff)
downloadvolse-hubzilla-411abdf8a74a7e6cb1914fd0d9545dd40b75544c.tar.gz
volse-hubzilla-411abdf8a74a7e6cb1914fd0d9545dd40b75544c.tar.bz2
volse-hubzilla-411abdf8a74a7e6cb1914fd0d9545dd40b75544c.zip
fix double encoding
-rwxr-xr-xinclude/items.php7
-rw-r--r--version.inc2
2 files changed, 5 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index a9597c1cf..2391bd11c 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2887,13 +2887,13 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
$signed_text = $datarray['mid'] . ';' . $parent_item['mid'] . ';' . $signed_body . ';' . $diaspora_handle;
- /** @FIXME $uprvkey is undefined, do we still need this if-statement? */
- if( $uprvkey !== false )
+
+ if( $channel && $channel['channel_prvkey'] )
$authorsig = base64_encode(rsa_sign($signed_text, $channel['channel_prvkey'], 'sha256'));
else
$authorsig = '';
- $x = array('signer' => $diaspora_handle, 'body' => $signed_body, 'signed_text' => $signed_text, 'signature' => base64_encode($authorsig));
+ $x = array('signer' => $diaspora_handle, 'body' => $signed_body, 'signed_text' => $signed_text, 'signature' => $authorsig);
$y = json_encode($x);
@@ -2902,6 +2902,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
intval($post_id)
);
+
if(! $r)
logger('store_diaspora_comment_sig: DB write failed');
diff --git a/version.inc b/version.inc
index 830cdcca5..583098250 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2016-02-17.1312H
+2016-02-21.1314H