aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Daemon/Externals.php4
-rw-r--r--Zotlabs/Lib/Activity.php12
-rw-r--r--Zotlabs/Lib/ActivityStreams.php2
-rw-r--r--Zotlabs/Lib/Libzot.php2
-rw-r--r--Zotlabs/Web/HTTPSig.php16
-rw-r--r--boot.php2
-rw-r--r--include/dba/dba_pdo.php7
-rw-r--r--include/feedutils.php4
-rw-r--r--view/fr/invite.formal.tpl19
9 files changed, 58 insertions, 10 deletions
diff --git a/Zotlabs/Daemon/Externals.php b/Zotlabs/Daemon/Externals.php
index 81414d02d..fb35a65c7 100644
--- a/Zotlabs/Daemon/Externals.php
+++ b/Zotlabs/Daemon/Externals.php
@@ -133,7 +133,9 @@ class Externals {
continue;
}
- Libzot::fetch_conversation($importer, $message['object']['id']);
+ $obj_id = isset($message['object']['id']) ?? $message['object'];
+
+ Libzot::fetch_conversation($importer, $obj_id);
$total++;
continue;
}
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 159f2a46f..e51922c86 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -116,6 +116,11 @@ class Activity {
$y = json_decode($x['body'], true);
logger('returned: ' . json_encode($y, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), LOGGER_DEBUG);
+
+ if (ActivityStreams::is_an_actor($y['type'])) {
+ XConfig::Set($y['id'], 'system', 'actor_record', $y);
+ }
+
return json_decode($x['body'], true);
}
else {
@@ -3709,7 +3714,10 @@ class Activity {
}
static function get_cached_actor($id) {
- $actor = XConfig::Get($id, 'system', 'actor_record');
+
+ // remove any fragments like #main-key since these won't be present in our cached data
+ $cache_url = ((strpos($id, '#')) ? substr($id, 0, strpos($id, '#')) : $id);
+ $actor = XConfig::Get($cache_url, 'system', 'actor_record');
if ($actor) {
return $actor;
@@ -3718,7 +3726,7 @@ class Activity {
// try other get_cached_actor providers (e.g. diaspora)
$hookdata = [
'id' => $id,
- 'actor' => false
+ 'actor' => null
];
call_hooks('get_cached_actor_provider', $hookdata);
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index b86203a34..275f6eff4 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -92,7 +92,7 @@ class ActivityStreams {
$this->ldsig = $this->get_compound_property('signature');
if ($this->ldsig) {
- $this->signer = $this->get_compound_property('creator', $this->ldsig);
+ $this->signer = $this->get_actor('creator', $this->ldsig);
if ($this->signer && is_array($this->signer) && array_key_exists('publicKey', $this->signer) && is_array($this->signer['publicKey']) && $this->signer['publicKey']['publicKeyPem']) {
$this->sigok = LDSignatures::verify($this->data, $this->signer['publicKey']['publicKeyPem']);
}
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index e78cb4568..e4d8d2275 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -3172,7 +3172,7 @@ class Libzot {
}
static function update_cached_hubloc($hubloc) {
- if ($hubloc['hubloc_updated'] > datetime_convert('UTC','UTC','now - 1 week') || $hubloc['hubloc_url'] === z_root()) {
+ if ($hubloc['hubloc_updated'] > datetime_convert('UTC','UTC','now - 3 days') || $hubloc['hubloc_url'] === z_root()) {
return;
}
self::refresh( [ 'hubloc_id_url' => $hubloc['hubloc_id_url'] ] );
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 7da9acabf..a7a59b8cf 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -156,6 +156,7 @@ class HTTPSig {
$cached_key = self::get_key($key, $keytype, $result['signer']);
+
if (!($cached_key && $cached_key['public_key'])) {
return $result;
}
@@ -243,7 +244,12 @@ class HTTPSig {
}
}
- $key = self::get_activitystreams_key($id, $force);
+ $delete = false;
+ if ($keytype === 'delete') {
+ $delete = true;
+ }
+
+ $key = self::get_activitystreams_key($id, $force, $delete);
return $key;
@@ -274,7 +280,7 @@ class HTTPSig {
* false if no pub key found, otherwise return an array with the pub key
*/
- static function get_activitystreams_key($id, $force = false) {
+ static function get_activitystreams_key($id, $force = false, $delete = false) {
// Check the local cache first, but remove any fragments like #main-key since these won't be present in our cached data
$url = ((strpos($id, '#')) ? substr($id, 0, strpos($id, '#')) : $id);
@@ -294,6 +300,12 @@ class HTTPSig {
}
}
+ if ($delete) {
+ // If we received a delete and we do not have the record cached,
+ // we probably never saw this actor. Do not try to fetch it now.
+ return false;
+ }
+
// The record wasn't in cache. Fetch it now.
$r = ActivityStreams::fetch($id);
diff --git a/boot.php b/boot.php
index 513e94363..5da93beae 100644
--- a/boot.php
+++ b/boot.php
@@ -60,7 +60,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
define('PLATFORM_NAME', 'hubzilla');
-define('STD_VERSION', '7.1.1');
+define('STD_VERSION', '7.1.2');
define('ZOT_REVISION', '6.0');
define('DB_UPDATE_VERSION', 1252);
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index 49f741601..2137ca0cc 100644
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -27,6 +27,13 @@ class dba_pdo extends dba_driver {
$dsn .= ';dbname=' . $db;
+ if ($this->driver_dbtype === 'mysql') {
+ $dsn .= ';charset=utf8mb4';
+ }
+ else {
+ $dsn .= ";options='--client_encoding=UTF8'";
+ }
+
try {
$this->db = new PDO($dsn,$user,$pass);
$this->db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
diff --git a/include/feedutils.php b/include/feedutils.php
index d31836983..1c653325d 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1180,7 +1180,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
else {
$name = $author['author_name'];
}
- $x = import_author_unknown(array('name' => $name,'url' => $author['author_link'],'photo' => array('src' => $author['author_photo'])));
+ $x = import_author_rss(array('name' => $name,'url' => $author['author_link'],'photo' => array('src' => $author['author_photo'])));
if($x)
$datarray['author_xchan'] = $x;
}
@@ -1440,7 +1440,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
else {
$name = $author['author_name'];
}
- $x = import_author_unknown(array('name' => $name,'url' => $author['author_link'],'photo' => array('src' => $author['author_photo'])));
+ $x = import_author_rss(array('name' => $name,'url' => $author['author_link'],'photo' => array('src' => $author['author_photo'])));
if($x)
$datarray['author_xchan'] = $x;
}
diff --git a/view/fr/invite.formal.tpl b/view/fr/invite.formal.tpl
new file mode 100644
index 000000000..404059af6
--- /dev/null
+++ b/view/fr/invite.formal.tpl
@@ -0,0 +1,19 @@
+{{* tpl FR formel, pour inviter de manière plus polie des personnes comme des membres d'entreprise ou des partenaires professionnels *}}.
+
+Veuillez rejoindre le réseau social {{$nom du projet}}. Ce message contient les données essentielles pour la première connexion.
+
+Le site est à rejoindre se trouve ici :
+{{$invite_whereami}}
+
+Votre accès est juste préparé avec un code d'invitation :
+{{$invite_code}}
+
+que vous devrez saisir dans le champ du formulaire d'inscription, qui s'affiche lorsque vous cliquez sur le lien "J'ai un code d'invitation". Veuillez également saisir votre adresse e-mail dans le champ suivant. Nous tenons à vous informer que le code d'invitation est lié à votre adresse électronique et n'est pas transférable.
+
+Pour des raisons de sécurité, vous devez fournir un mot de passe de compte qui n'est et ne doit rester connu que de vous. Le mot de passe non visible doit être tapé deux fois pour éviter toute erreur de frappe. Le mot de passe est toujours demandé ultérieurement lorsque vous voulez vous connecter au site.
+
+Selon la configuration du site, vous pouvez recevoir un autre courriel à votre adresse avec un code de validation, à saisir dans le formulaire vers lequel ce courriel vous dirigera. Ce genre de mesure contribue à renforcer la sécurité du site.
+
+Selon la configuration du site, un administrateur devra valider votre accès. Merci de patienter car cela ne se fera pas instantanément.
+
+Cordialement.