aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-06-27 13:05:25 +0200
committerMario <mario@mariovavti.com>2019-06-27 13:05:25 +0200
commit49ba3ffee6e53eefe11a03c62ee673398717b167 (patch)
treea0f0b45249487bd471bcf0545dfbb23f7b871623 /include/import.php
parent5ccef18d4e5b7901f78a11e0124c16e1c484e3bf (diff)
parentcf844cb27c02c3aae636eb1aa1587b1d5e3e81a0 (diff)
downloadvolse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.tar.gz
volse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.tar.bz2
volse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.zip
Merge branch 'httpsig' into 'dev'
http signature consolidation See merge request hubzilla/core!1685
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/import.php b/include/import.php
index caf25f5d2..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);
@@ -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);