aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/import.php b/include/import.php
index 24ad1b901..1d3b7c035 100644
--- a/include/import.php
+++ b/include/import.php
@@ -2,6 +2,8 @@
use Zotlabs\Lib\IConfig;
+use Zotlabs\Web\HTTPSig;
+
require_once('include/menu.php');
require_once('include/perm_upgrade.php');
@@ -1329,7 +1331,7 @@ function sync_files($channel, $files) {
$headers = [];
$headers['Accept'] = 'application/x-zot+json' ;
$headers['Sigtoken'] = random_string();
- $headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
+ $headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], 'acct:' . channel_reddress($channel),true,'sha512');
$x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
fclose($fp);
@@ -1390,7 +1392,7 @@ function sync_files($channel, $files) {
$p['content'] = (($p['content'])? base64_decode($p['content']) : '');
}
- if (intval($p['imgscale']) && ((intval($p['os_storage'])) || (! $p['content']))) {
+ if(intval($p['imgscale'])) {
$time = datetime_convert();
@@ -1415,7 +1417,7 @@ function sync_files($channel, $files) {
$headers = [];
$headers['Accept'] = 'application/x-zot+json' ;
$headers['Sigtoken'] = random_string();
- $headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
+ $headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),true,'sha512');
$x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
fclose($fp);