fix double encoding
This commit is contained in:
parent
dfbe2eaf98
commit
411abdf8a7
@ -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;
|
$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'));
|
$authorsig = base64_encode(rsa_sign($signed_text, $channel['channel_prvkey'], 'sha256'));
|
||||||
else
|
else
|
||||||
$authorsig = '';
|
$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);
|
$y = json_encode($x);
|
||||||
|
|
||||||
@ -2902,6 +2902,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
|
|||||||
intval($post_id)
|
intval($post_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if(! $r)
|
if(! $r)
|
||||||
logger('store_diaspora_comment_sig: DB write failed');
|
logger('store_diaspora_comment_sig: DB write failed');
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2016-02-17.1312H
|
2016-02-21.1314H
|
||||||
|
Reference in New Issue
Block a user