From 58ffa31e911ad985078107638aabe7c0a864f5ce Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 26 Aug 2015 23:00:33 -0700 Subject: redphotos updates --- include/photos.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/photos.php b/include/photos.php index 4f5e1d077..04018ac0d 100644 --- a/include/photos.php +++ b/include/photos.php @@ -281,7 +281,14 @@ function photo_upload($channel, $observer, $args) { $item['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' . $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]' . '[/zrl]'; - $item['sig'] = ''; + + if($item['author_xchan'] === $channel['channel_hash']) { + $item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey'])); + $item['item_verified'] = 1; + } + else { + $item['sig'] = ''; + } $force = true; } -- cgit v1.2.3