Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Remove follower" does not work due to referencing wrong Follow ID #11015

Open
trwnh opened this issue Jun 15, 2023 · 1 comment
Open

"Remove follower" does not work due to referencing wrong Follow ID #11015

trwnh opened this issue Jun 15, 2023 · 1 comment
Labels
⚠️bug? This might be a bug

Comments

@trwnh
Copy link
Contributor

trwnh commented Jun 15, 2023

💡 Summary

"Remove follower" does not work due to wrong Follow ID. (originally filed as #9250 and marked fixed by #10600 but not actually fixed)

🥰 Expected Behavior

A Reject Follow is sent out referencing the remote Follow ID, or null ID for transient Follow activity

🤬 Actual Behavior

A Reject Follow is sent out referencing the local Follow ID

📝 Steps to Reproduce

  1. Try to Remove follower

📌 Environment

Misskey version: 13.9.2

image

Simplified representation of the activity:

id: misskey.bubbletea.dev/1153...
actor: misskey.bubbletea.dev/users/8r0...
type: Reject
object:    # local pseudo-id
    id: misskey.bubbletea.dev/follows/97hb...
    actor: akkoma.trwnh.com/users/a
    type: Follow
    object: misskey.bubbletea.dev/users/8r0...

Akkoma fails to recognize the Follow by its remote ID. This is a bug in Akkoma, but Misskey should probably send remote/original Follow ID if it is available. Otherwise id should not be included.

Acceptable solution:

id: misskey.bubbletea.dev/1153...
actor: misskey.bubbletea.dev/users/8r0...
type: Reject
object:    # no id
    actor: akkoma.trwnh.com/users/a
    type: Follow
    object: misskey.bubbletea.dev/users/8r0...

Also acceptable solution:

id: misskey.bubbletea.dev/1153...
actor: misskey.bubbletea.dev/users/8r0...
type: Reject
object:    # original id on remote domain
    id: akkoma.trwnh.com/...
    actor: akkoma.trwnh.com/users/a
    type: Follow
    object: misskey.bubbletea.dev/users/8r0...
@trwnh trwnh added the ⚠️bug? This might be a bug label Jun 15, 2023
@trwnh
Copy link
Contributor Author

trwnh commented Jun 15, 2023

11:25:44.541 [debug] Unhandled activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "Emoji": "toot:Emoji",
      "Hashtag": "as:Hashtag",
      "PropertyValue": "schema:PropertyValue",
      "_misskey_content": "misskey:_misskey_content",
      "_misskey_quote": "misskey:_misskey_quote",
      "_misskey_reaction": "misskey:_misskey_reaction",
      "_misskey_votes": "misskey:_misskey_votes",
      "discoverable": "toot:discoverable",
      "featured": "toot:featured",
      "isCat": "misskey:isCat",
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
      "misskey": "https://misskey-hub.net/ns#",
      "quoteUrl": "as:quoteUrl",
      "schema": "http://schema.org#",
      "sensitive": "as:sensitive",
      "toot": "http://joinmastodon.org/ns#",
      "value": "schema:value",
      "vcard": "http://www.w3.org/2006/vcard/ns#"
    }
  ],
  "actor": "https://nya.social/users/817aea427f792178e7c1235e",
  "cc": [
    "https://akkoma.trwnh.com/users/a"
  ],
  "id": "https://nya.social/41e4f08e-7cb9-4d05-8c00-946ba19d4281",
  "nickname": "a",
  "object": {
    "actor": "https://akkoma.trwnh.com/users/a",
    "cc": [
      "https://akkoma.trwnh.com/users/a"
    ],
    "id": "https://nya.social/follows/81846b4926e3a4fbbe9122f5/817aea427f792178e7c1235e",
    "object": "https://nya.social/users/817aea427f792178e7c1235e",
    "type": "Follow"
  },
  "type": "Reject"
}

once again you see the incorrect id:

"object": {
  "actor": "https://akkoma.trwnh.com/users/a",
  "cc": [
    "https://akkoma.trwnh.com/users/a"
  ],
  "id": "https://nya.social/follows/81846b4926e3a4fbbe9122f5/817aea427f792178e7c1235e",
  "object": "https://nya.social/users/817aea427f792178e7c1235e",
  "type": "Follow"
},

clearly "actor": "https://akkoma.trwnh.com/users/a" could not have issued the activity "id": "https://nya.social/follows/81846b4926e3a4fbbe9122f5/817aea427f792178e7c1235e" because they are not on nya.social, they are on akkoma.trwnh.com, and by Same-Origin Policy this activity gets rejected by pleroma/akkoma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
Development

No branches or pull requests

1 participant