LemmyNet/lemmy

[Bug]: Inbound federation of home-instance bans from <0.19.4 instances does not work in 0.19.4-beta.6

Nothing4You opened this issue · 1 comments

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

A 0.19.4-beta.6 instance can not receive an activity of a user getting home-instance banned.
This seems to be limited to home instance bans coming from instances not running 0.19.4-beta.6, receiving home instance bans from 0.19.4-beta.6 instances seems to work fine.

Steps to Reproduce

  1. Create user on <0.19.4 instance
  2. Generate activity with user to ensure it gets federated
  3. Ban user from home instance
  4. Ban is not received properly by 0.19.4-beta.6 instance

Technical Details

7c4tx1lemrocks_lemmy_1          | 2024-05-04T21:35:08.833222Z  INFO send:send_lemmy_activity: lemmy_apub::activities: Saving outgoing activity to queue https://7c4tx1.lem.rocks/activities/block/278b9854-2e64-427f-9dcd-65544c86dd5b
7c4tx1lemrocks_lemmy_1          | 2024-05-04T21:35:14.141506Z  INFO actix_web::middleware::logger: 128.140.117.209 'GET / HTTP/1.0' 200 1003 '-' 'Lemmy/0.19.4-beta.6; +https://f3heh9.lem.rocks' 0.002502
lemmy-1          | 2024-05-04T21:35:14.111125Z  INFO HTTP request{http.method=POST http.scheme="http" http.host=f3heh9.lem.rocks http.target=/inbox otel.kind="server" request_id=79c47e42-c137-40a8-b177-c9edc6395578}:receive:community: activitypub_federation::fetch: Fetching remote object https://7c4tx1.lem.rocks/
lemmy-1          | 2024-05-04T21:35:14.144648Z  INFO HTTP request{http.method=POST http.scheme="http" http.host=f3heh9.lem.rocks http.target=/inbox otel.kind="server" request_id=79c47e42-c137-40a8-b177-c9edc6395578}:receive:verify: activitypub_federation::fetch: Fetching remote object https://7c4tx1.lem.rocks/
lemmy-1          | 2024-05-04T21:35:14.150254Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: Unknown: Failed to parse object https://7c4tx1.lem.rocks/ with content {
lemmy-1          |   "@context": [
lemmy-1          |     "https://join-lemmy.org/context.json",
lemmy-1          |     "https://www.w3.org/ns/activitystreams"
lemmy-1          |   ],
lemmy-1          |   "type": "Application",
lemmy-1          |   "id": "https://7c4tx1.lem.rocks/",
lemmy-1          |   "name": "7c4tx1.lem.rocks",
lemmy-1          |   "inbox": "https://7c4tx1.lem.rocks/inbox",
lemmy-1          |   "outbox": "https://7c4tx1.lem.rocks//site_outbox",
lemmy-1          |   "publicKey": {
lemmy-1          |     "id": "https://7c4tx1.lem.rocks/#main-key",
lemmy-1          |     "owner": "https://7c4tx1.lem.rocks/",
lemmy-1          |     "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHQCyoja+fwORzpEqZbr\nA9fH6LkJlDnXSJbS5UWjrObC1ibA0gZP6xmsOuLus4qeVmK3ejqft2izKhxUdfNp\nWVFBLapB56tD+GPT2OvDNVzXUSdhaXLCGrCWYnzTpZXMtY54NA7ACOJ65EDMdlnO\nO/dKwkiyXqXyZ6JWXVMC+dByrb3DcsCQYt2y1pobgM/at9y8Zdxgt9v7FFScLKi4\nzA/jHizQA1qi49dC0/0bJnXqt0H9TOEOLdtk81AlvLJECvBOndiTglHlXz/+X9KE\neZOBLgG6/rXRu6X53/E3weck1SU/zk+OmqsFWJyduGlCl6MlMDyPkGdR83vcvyYj\nDQIDAQAB\n-----END PUBLIC KEY-----\n"
lemmy-1          |   },
lemmy-1          |   "language": [],
lemmy-1          |   "published": "2024-04-25T00:29:42.723749Z",
lemmy-1          |   "updated": "2024-04-25T01:40:42.736864Z"
lemmy-1          | }: data did not match any variant of untagged enum InstanceOrGroup
lemmy-1          |    0: lemmy_apub::activities::block::block_user::verify
lemmy-1          |              at crates/apub/src/activities/block/block_user.rs:130
lemmy-1          |    1: lemmy_apub::activities::community::announce::receive
lemmy-1          |              at crates/apub/src/activities/community/announce.rs:51
lemmy-1          |    2: lemmy_server::root_span_builder::HTTP request
lemmy-1          |            with http.method=POST http.scheme="http" http.host=f3heh9.lem.rocks http.target=/inbox otel.kind="server" request_id=79c47e42-c137-40a8-b177-c9edc6395578 http.status_code=400 otel.status_code="OK"
lemmy-1          |              at src/root_span_builder.rs:16
lemmy-1          | 2024-05-04T21:35:14.150657Z  INFO actix_web::middleware::logger: 49.13.62.227 'POST /inbox HTTP/1.0' 400 1239 '-' 'Lemmy/0.19.3; +https://7c4tx1.lem.rocks' 0.044860

Version

0.19.4-beta.6

Lemmy Instance URL

No response

This is probably also fixed by #4713 then.