Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit 968eab29 authored by Zot's avatar Zot

convert the rest of the lookups to httpsig+salmon

parent 2f07c7d2
......@@ -32,14 +32,26 @@ class Activity extends \Zotlabs\Web\Controller {
xchan_query($r,true);
$items = fetch_post_tags($r,true);
$chan = channelx_by_n($items[0]['uid']);
$x = array_merge(['@context' => [
'https://www.w3.org/ns/activitystreams',
[ 'me' => 'http://salmon-protocol.org/ns/magic-env' ],
[ 'zot' => 'http://purl.org/zot/protocol' ]
]], asencode_activity($items[0]));
header('Content-Type: application/activity+json');
json_return_and_die($x);
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = \HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
\HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
......
......@@ -61,19 +61,19 @@ class Outbox extends \Zotlabs\Web\Controller {
[ 'zot' => 'http://purl.org/zot/protocol' ]
]], asencode_item_collection($items, \App::$query_string, 'OrderedCollection'));
if(pubcrawl_magic_env_allowed()) {
$x = pubcrawl_salmon_sign(json_encode($x),$chan);
header('Content-Type: application/magic-envelope+json');
json_return_and_die($x);
}
else {
header('Content-Type: application/activity+json');
$ret = json_encode($x);
\HTTPSig::generate_digest($ret);
echo $ret;
killme();
}
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = \HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
\HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
}
......
......@@ -206,7 +206,7 @@ function pubcrawl_channel_mod_init($x) {
$ret = json_encode($x);
$hash = HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . argv(1),true);
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
......@@ -434,19 +434,18 @@ function pubcrawl_profile_mod_init($x) {
'describes' => asencode_person($chan)
];
if(pubcrawl_magic_env_allowed()) {
$x = pubcrawl_salmon_sign(json_encode($x),$chan);
header('Content-Type: application/magic-envelope+json');
json_return_and_die($x);
}
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
}
......@@ -496,14 +495,12 @@ function pubcrawl_item_mod_init($x) {
]], asencode_item($items[0]));
if(pubcrawl_magic_env_allowed()) {
$x = pubcrawl_salmon_sign(json_encode($x),$chan);
header('Content-Type: application/magic-envelope+json');
json_return_and_die($x);
}
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
......@@ -547,20 +544,17 @@ function pubcrawl_thing_mod_init($x) {
$x['image'] = $r[0]['obj_image'];
if(pubcrawl_magic_env_allowed()) {
$x = pubcrawl_salmon_sign(json_encode($x),$chan);
header('Content-Type: application/magic-envelope+json');
json_return_and_die($x);
}
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
}
......@@ -592,19 +586,19 @@ function pubcrawl_follow_mod_init($x) {
'object' => asencode_person($r[0])
]);
if(pubcrawl_magic_env_allowed()) {
$x = pubcrawl_salmon_sign(json_encode($x),$chan);
header('Content-Type: application/magic-envelope+json');
json_return_and_die($x);
}
$headers = [];
$headers['Content-Type'] = 'application/activity+json' ;
$ret = json_encode($x);
$y = pubcrawl_salmon_sign($ret,$chan);
$x['me:env'] = $y;
$ret = json_encode($x);
$hash = HTTPSig::generate_digest($ret,false);
$headers['Digest'] = 'SHA-256=' . $hash;
HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],z_root() . '/channel/' . $chan['channel_address'],true);
echo $ret;
killme();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment