• plord12

    (@plord12)


    I’ve started to host a friendica site, https://u3a.social, and sometimes there are interactions to my wordpress/activitypub site https://u3acommunities.org.

    I’ve started to see on friendica errors posting to wordpress – https://immich.plord.co.uk/share/PHVS4ctRhrP7mowQcY1Cg1hDWmlj5FCdgwF-Woan0y8qNALlOvhWljZXxkpE-gOMy2U

    The related friendica log seems to be –

    2025-11-13T10:52:19Z worker [NOTICE]: Delivery failed {"retcode":"401","serverfailure":false,"drop":false,"runtime":2.268,"uri-id":170051,"uid":26,"item_id":28977,"cmd":"wall-new","inbox":"https://u3acommunities.org/wp-json/activitypub/1.0/actors/0/inbox","worker_id":"3ac9fcb","worker_cmd":"APDelivery"} - {"file":"Delivery.php","line":164,"function":"deliverToInbox","request-id":"6915b86067245","stack":"Delivery::deliverToInbox (66), APDelivery::execute, Worker::execFunction (374), Worker::execute (109), Worker::processQueue (75)","uid":"21b251","process_id":65862}
    <harper-render-box id=”harper-highlight-host”></harper-render-box>

    In the wordpress logs I see –

    u3acommunities.org 145.40.187.76 - - [13/Nov/2025:10:52:17 +0000] "POST /wp-json/activitypub/1.0/actors/0/inbox HTTP/1.1" 401 218 "-" "Friendica/2024.12 DatabaseVersion/1576 Request/ActivityPub/1 +https://u3a.social"<harper-render-box id=”harper-highlight-host”></harper-render-box>

    Hard to tell whats really going on here …

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Matthias Pfefferle

    (@pfefferle)

    Hey @plord12 👋

    there could always be issues because WordPress may not support every type of Activity that Friendi.ca sends. To investigate this specific case, we’d need to see the exact Activity that triggered the problem.

    Thread Starter plord12

    (@plord12)

    I guess I can try increasing the friendica logging to see if I can get the contents of the POST.

    I wondered if this is related to wordpress events (such as https://u3acommunities.org/event/quantum-computers/). If there was an interraction on friendica, such as a like, since wordpress events don’t (seem) to support comments would activitypub return a 401 ? If this guess is correct, shouldn’t this post be shared as comments not supported (or similar) ?

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    If there was an interraction on friendica, such as a like, since wordpress events don’t (seem) to support comments would activitypub return a 401 ?

    The comment handling will be in a different thread, so it should not throw an error even if the event is not supporting comments.

    401 is normally returned if there is something wrong with the signature. Maybe it is simply the “double knock” process, where friendi.ca tries the different signature versions: https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions

    You enable rfc9421 support for your Blog in the Advanced Settings.

    Thread Starter plord12

    (@plord12)

    As always, thanks for the response.

    This is the request from frendica (u3a.social) to wordpress (u3acommunities.org) that is returning 401

      "headers":

    "User-Agent": "Friendica/2024.12 DatabaseVersion/1576 Request/ActivityPub/1 +https://u3a.social",
    "Date": "Fri, 14 Nov 2025 12:31:53 GMT",
    "Content-Length": 2132,
    "Digest": "SHA-256=37/5En9aWYXIhioE41eKimguE7WUk2139uyBualwuts=",
    "Host": "u3acommunities.org",
    "Signature": "keyId=\"https://u3a.social/profile/u3anews#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) date content-length digest host\",signature=\"e4wlfjSPsG+kosM1Q0P4dNFj1sX5i7Tlv9F2YBtm0eB9bNapSERaLrIJQfXmoTYVS2e8C2gTq5K9LSehOXPb/JrvS+Zyo5C8o5T34ysn2qEu34XH67QBDKZfw9vHKM4qFmkr0F/DUR7iZJ/UWxP/UQwwZZwPo2KbdWIR8pENLa0Leh5LEpPA4A4iltpH+2vBFSYoq99s+aWrOfctchZjovtzfpBg9aX/iqR2UhvGTlabOudDulALSz0keG1xdwETrP9wqBSsAIHoXLn/90wMC9AuPdDVU2qsc1MGC+GpLI1Oz8QVeidZnihIovK3D4qpI8S/EuPAvUQwpti39aLJEFidCwtaS633DT0kcVJb0iq7ltwcdfeQS3Lr5k3M9jpypJ+zBL/Yi2MGiSYN/dcNuV53bZEDatzMmdXbazda34b+4wIcDZf2/70O44viM6CzvM8H1VxMvtrtObiijCNXlOkZ07G0dVTg/VtAglSleBKSVdQaORBi9TuqraSBLXOOYdwpMEIBf1syvdqBUXMR9qWNpOMCktudNWrnfJ3NePISB4Hfxupuc10U+6rieaQ1kcjKQo8dCv1QMoRBWRZAY8+cmyCfZX2nsPpR56+a2r8GgWiLXE+QEOHwiiQ0wjQkqvpcGh55m3L5ACW+/0lOA8Ko+LrMdO+iWil8L53oUp8=\"",
    "Content-Type": "application/activity+json"

    body:

    {
    "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
    "ostatus": "http://ostatus.org#",
    "vcard": "http://www.w3.org/2006/vcard/ns#",
    "dfrn": "http://purl.org/macgirvin/dfrn/1.0/",
    "diaspora": "https://diasporafoundation.org/ns/",
    "litepub": "http://litepub.social/ns#",
    "toot": "http://joinmastodon.org/ns#",
    "featured": {
    "@id": "toot:featured",
    "@type": "@id"
    },
    "schema": "http://schema.org#",
    "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
    "sensitive": "as:sensitive",
    "Hashtag": "as:Hashtag",
    "quoteUrl": "as:quoteUrl",
    "conversation": "ostatus:conversation",
    "directMessage": "litepub:directMessage",
    "discoverable": "toot:discoverable",
    "PropertyValue": "schema:PropertyValue",
    "value": "schema:value"
    }
    ],
    "id": "https://u3a.social/objects/c66bfb1b-2169-15b8-5fbc-cca387334512",
    "type": "Announce",
    "actor": "https://u3a.social/profile/u3anews",
    "published": "2025-11-13T10:52:15Z",
    "instrument": {
    "id": "https://u3a.social/friendica",
    "type": "Application",
    "name": "Friendica Interrupted Fern 2024.12-1576",
    "url": "https://u3a.social"
    },
    "to": [
    "https://u3acommunities.org/?author=0",
    "https://www.w3.org/ns/activitystreams#Public",
    "https://u3a.social/followers/u3anews"
    ],
    "cc": [],
    "object": "https://u3acommunities.org/?p=22212",
    "signature": {
    "type": "RsaSignature2017",
    "nonce": "95d6c7638fc8878a3187c18a6a95081999274fad3ebaa84a13b588e4a8edf75d",
    "creator": "https://u3a.social/profile/u3anews#main-key",
    "created": "2025-11-14T12:31:53Z",
    "signatureValue": "MK0P5FuW8Hopo8xV6mTI0Mbo82GWkglMKxwRvYmPby52HpjBoVNSXhqHCctBQd0MBrsXnqMpzmzOoTDvCLjtPXEPGIG5OqRltiq3IZw2xJkI/iKRRW+RnZrBbavsJDjlPqqTu4mRO369TRe2SDT6NN/fkhKKYRudVIjfqag7PgmfhbrCBPwbZhsSBQVhg7bITTvrhKGRDwFGZTP5p1OM1U9MO7AqtU3YDHnsVtXTXRZnDE6jB89bOofeFCQVxK8evDDWBgLT5E1l0DFmrKbqEDHy923Rm4x+1ztYffL2ZSRIHqbESI4xGsIKbDFxSwo0C4/Y/ccxI67kDDh2fN9JIBzcNZIfiy2bn/xVK6UJrBlI9AU2Hig0BLlUfQKjBhogesCPzsgGPK+BmvIhDVMn0lwdSMqkjwjCrLUNIywoAHp0NF5/W6DcNDsgJ1hxIan1NUkq1scNI1cuWUNHA7tiZW7GlCJroZt1p1grc8DYq0n3WpVyYrka1mMHFbVEo2EfJ3PugfJeemJqscHcqHoqZTPkH864XUkbEyCOS61jM0rmPt6AiNP5QklybmclJ7gcGV5WKcQtOs0wQosfLomrG2nk/OhkZE9mEKKYs0Tlcbu6E1nw79yqieA/ryMtt3WrtM+z0rkEbHfE4LjAQG0zbal5VcH9CAE2xUWeqY24nvI="
    }
    }

    So an Announce.

    I do have post interactions “Receive reblogs (boosts)” and “Auto approve reactions” disabled so maybe thats it ?

    I couldn’t find a rfc9421 setting.

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    You have to click the “Screen Options” on the settings page and enable the “Advanced Settings”. Then you see a “Modern Signature Format” on the “Advanced Settings” screen. I will check the Activity later today.

    Plugin Author Konstantin Obenland

    (@obenland)

    Thank you for sharing the full request, that’s helpful.

    It doesn’t look like it’s an RFC-9421 signature issue, and testing signature verification locally with that request as the input succeeds for me.

    If you have a snippets plugin or access to your theme’s functions.php file or another way to run code on your WP site, would you mind trying a snippet like this, to see what the error response actually contains?

    add_filter( 'rest_post_dispatch', function( $result, $server, $request ) {
    if ( 401 === $result->get_status() ) {
    error_log( '=== 401 Response at ' . gmdate( 'Y-m-d H:i:s' ) . ' ===' );
    error_log( 'Route: ' . $request->get_route() );
    error_log( 'Error Response: ' . print_r( $result->get_data(), true ) );
    }

    return $result;
    }, 10, 3 );
    Thread Starter plord12

    (@plord12)

    You have to click the “Screen Options” on the settings page and enable the “Advanced Settings”. Then you see a “Modern Signature Format” on the “Advanced Settings” screen. I will check the Activity later today.

    Ah, thanks, not come across that before.

    Thread Starter plord12

    (@plord12)

    If you have a snippets plugin or access to your theme’s functions.php file or another way to run code on your WP site, would you mind trying a snippet like this, to see what the error response actually contains?

    Thanks, added. I’ll attach here the results when I get the next 401 that looks like this.

    Thread Starter plord12

    (@plord12)

    If you have a snippets plugin or access to your theme’s functions.php file or another way to run code on your WP site, would you mind trying a snippet like this, to see what the error response actually contains?

    The friendica worker thread kicked in –

    [14-Nov-2025 23:17:52 UTC] === 401 Response at 2025-11-14 23:17:52 ===
    [14-Nov-2025 23:17:52 UTC] Route: /activitypub/1.0/actors/0/inbox
    [14-Nov-2025 23:17:52 UTC] Error Response: Array
    (
    [code] => activitypub_signature_verification
    [message] => Invalid signature
    [data] => Array
    (
    [status] => 401
    )

    )

    I’ve ticked “Modern Signature Format” on the wordpress site and will wait for friendica to re-try

    Thread Starter plord12

    (@plord12)

    I’ve ticked “Modern Signature Format” on the wordpress site and will wait for friendica to re-try

    No change.

    [17-Nov-2025 13:01:12 UTC] === 401 Response at 2025-11-17 13:01:12 ===
    [17-Nov-2025 13:01:12 UTC] Route: /activitypub/1.0/inbox
    [17-Nov-2025 13:01:12 UTC] Error Response: Array
    (
    [code] => activitypub_signature_verification
    [message] => Invalid signature
    [data] => Array
    (
    [status] => 401
    )

    )
    Plugin Author Konstantin Obenland

    (@obenland)

    The Modern Signature Format is a bit of a red herring, as it’s about enabling an updated signature standard for outgoing requests.

    So yes, it looks like the way Friendica is creating its signature and the way that we try to verify it is at odds with each other. Like I said earlier, testing signature verification locally with the request you shared as the input succeeds for me, so I’m a bit stumped at the moment as to what may cause this.

    Let me see if there is something else I can come up with to better debug this and understand what’s going on.

    Thread Starter plord12

    (@plord12)

    Let me see if there is something else I can come up with to better debug this and understand what’s going on.

    Great, many thanks for your help.

    Plugin Author Konstantin Obenland

    (@obenland)

    I’ve set up a Friendica account and started following my WordPress site, as well as sending DMs, reposts and Likes—so far that all seems to work.

    I’m afraid I’m a bit at the ends of my wits on this one.

    Thread Starter plord12

    (@plord12)

    I’ve set up a Friendica account and started following my WordPress site, as well as sending DMs, reposts and Likes—so far that all seems to work.

    I’m afraid I’m a bit at the ends of my wits on this one.

    Many thanks for following up on this one.

    What version of Friendica did you install ? I’m running 2024.12 (I guess its possible this has been fixed in a later RC).

    I still see the friendica deferred worker queue re-trying APDelivery to wordpress (https://SERVER/admin/queue/deferred)

    Plugin Author Konstantin Obenland

    (@obenland)

    I signed up for an account on https://friendica.opensocial.space, it looks like they’re running 2025.07-rc.

Viewing 15 replies - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.