aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/photos.php9
1 files changed, 8 insertions, 1 deletions
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;
}