From 49a4bee76a20ea017e81bcd0b6a06a7dae950f49 Mon Sep 17 00:00:00 2001 From: Sascha Nitsch Date: Wed, 7 May 2025 17:01:11 +0200 Subject: [PATCH] small bug fixes --- README.md | 2 +- config.ini | 2 +- php/federator/api/fedusers/outbox.php | 1 - .../common/{Announce.php => announce.php} | 0 rediscache.ini | 1 + templates/federator/host-meta.xml | 2 +- templates/federator/user.json | 12 ++++++------ 7 files changed, 10 insertions(+), 10 deletions(-) rename php/federator/data/activitypub/common/{Announce.php => announce.php} (100%) diff --git a/README.md b/README.md index 51df547..c6906df 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ If the include redis cache is enabled, - install redis - create a users.acl for redis with the content: - user federator on ~u_* +get +set ~s_* +get +setex ~m_* +get +setex >redis*change*password + user federator on ~u_* +get +set ~s_* +get +setex ~m_* +get +setex ~publickey_* +get +setex >redis*change*password - change password in the rediscache.ini to match your given password. - install the redis plugin from pecl if not provided via your distro diff --git a/config.ini b/config.ini index 9e2e5c0..07fa4a3 100644 --- a/config.ini +++ b/config.ini @@ -1,5 +1,5 @@ [generic] -externaldomain = 'your.fqdn' +externaldomain = 'contentnation.net' [database] host = '127.0.0.1' diff --git a/php/federator/api/fedusers/outbox.php b/php/federator/api/fedusers/outbox.php index 92b1170..9e66714 100644 --- a/php/federator/api/fedusers/outbox.php +++ b/php/federator/api/fedusers/outbox.php @@ -43,7 +43,6 @@ class Outbox implements \Federator\Api\FedUsers\FedUsersInterface $dbh = $this->main->getDatabase(); $cache = $this->main->getCache(); $connector = $this->main->getConnector(); - // get user $user = \Federator\DIO\User::getUserByName( $dbh, diff --git a/php/federator/data/activitypub/common/Announce.php b/php/federator/data/activitypub/common/announce.php similarity index 100% rename from php/federator/data/activitypub/common/Announce.php rename to php/federator/data/activitypub/common/announce.php diff --git a/rediscache.ini b/rediscache.ini index 1d97d0c..c12d1ef 100644 --- a/rediscache.ini +++ b/rediscache.ini @@ -2,6 +2,7 @@ host = localhost port = 6379 username = federator +password = redis*change*password userttl = 10 publickeypemttl = 3600 statsttl = 60 diff --git a/templates/federator/host-meta.xml b/templates/federator/host-meta.xml index 0b2b948..aa34ea7 100644 --- a/templates/federator/host-meta.xml +++ b/templates/federator/host-meta.xml @@ -1,4 +1,4 @@ -version="1.0" encoding="UTF-8"?> + diff --git a/templates/federator/user.json b/templates/federator/user.json index 23d225e..13a2aaf 100644 --- a/templates/federator/user.json +++ b/templates/federator/user.json @@ -60,12 +60,12 @@ ], "id":"https://{$fqdn}/{$username}", "type":"{$type}", - "following":"https://{$fqdn}/users/{$username}/following", - "followers":"https://{$fqdn}/users/{$username}/followers", - "inbox":"https://{$fqdn}/users/{$username}/inbox", - "outbox":"https://{$fqdn}/users/{$username}/outbox", - "featured":"https://{$fqdn}/users/{$username}/collections/featured", - "featuredTags":"https://{$fqdn}/users/{$username}/collections/tags", + "following":"https://{$fqdn}/{$username}/following", + "followers":"https://{$fqdn}/{$username}/followers", + "inbox":"https://{$fqdn}/{$username}/inbox", + "outbox":"https://{$fqdn}/{$username}/outbox", + "featured":"https://{$fqdn}/{$username}/collections/featured", + "featuredTags":"https://{$fqdn}/{$username}/collections/tags", "preferredUsername":"{$username}", "name":"{$name}", "summary":"{$summary}",