aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-26 23:00:33 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-26 23:00:33 -0700
commit58ffa31e911ad985078107638aabe7c0a864f5ce (patch)
treea32390dd2356b59a563cb7f2e56258b1d7a06429
parent2bce61d18bcba2f03be3cd9f7129c4d4053213b6 (diff)
downloadvolse-hubzilla-58ffa31e911ad985078107638aabe7c0a864f5ce.tar.gz
volse-hubzilla-58ffa31e911ad985078107638aabe7c0a864f5ce.tar.bz2
volse-hubzilla-58ffa31e911ad985078107638aabe7c0a864f5ce.zip
redphotos updates
-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;
}