FChannel0 / FChannel-Server

GNU Affero General Public License v3.0
106 stars 14 forks source link

inReplyTo: id: NaN #73

Open ghost opened 2 years ago

ghost commented 2 years ago

Received this strange looking activity from Usagi:

{
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Create",
    "actor": {
        "type": "Group",
        "id": "https://usagi.reisen/g",
        "inbox": "https://usagi.reisen/g/inbox",
        "outbox": "https://usagi.reisen/g/outbox",
        "following": "https://usagi.reisen/g/following",
        "followers": "https://usagi.reisen/g/followers",
        "name": "g",
        "preferredUsername": "Technology",
        "publicKey": {
            "id": "https://usagi.reisen/g#main-key",
            "owner": "https://usagi.reisen/g",
            "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvavdqHvSk7LyGVYSDGc6\nIRamP+YcgThklp06WQaDHMzlqNc+SboGzJDm8ej0tDsiOv5tC1sSZnjrif25XEiR\n0TpT3CGa1Jznq7HFpZySLGSBeNmM0MeOucvYOD9WNBdd+Zdp7TIVaZq0tqjZG2sn\nBJHtjNkW0aUO18aBWDKurOniUr+FaJ6+nypc5SXk8ni57tlhWNP6IrI+5CmmWcVL\n+wtUOPckriE0lJcbYP+RKj6Up5+1BbbiD5pkjHR+vfSKX8dtrPyTQyOi04xtI8z0\n6nsHoLFEHy1mFt/P/kOQ9zguh5zodUw3+sltTMMdncyIDwBFIzyU0qB7ioPY778V\n3wIDAQAB\n-----END PUBLIC KEY-----\n"
        },
        "restricted": true
    },
    "to": [
        "",
        "https://usagi.reisen",
        "http://kyogi7dxn3mr6a7eabaqh3jnxbbqbhty46aqstuhmqmokcxgr4vnbpid.onion",
        "https://penchan.xyz",
        "https://poopchan.org",
        "https://chan.clubcyberia.co",
        "https://0x00000000.xyz",
        "https://poopchan.org/g",
        "https://penchan.xyz/g",
        "https://fchan.xyz/g",
        "https://chan.cum.salon/tech",
        "http://kyogi7dxn3mr6a7eabaqh3jnxbbqbhty46aqstuhmqmokcxgr4vnbpid.onion/g",
        "http://awoobbsamzdzpji2etemlbj2xvugsljyqwfcltd2jiirbdjmicgxeiid.onion/g",
        "https://chan.getgle.org/tech"
    ],
    "published": "2022-08-10T01:32:56.643179935Z",
    "object": {
        "type": "Note",
        "id": "https://usagi.reisen/g/4EIW0DER",
        "actor": "https://usagi.reisen/g",
        "content": "\u003e\u003ehttp://awoobbsamzdzpji2etemlbj2xvugsljyqwfcltd2jiirbdjmicgxeiid.onion/g/AEBCB01B\r\nDIY or DIE\r\n\r\n",
        "inReplyTo": [
            {
                "id": "NaN",
                "published": "0001-01-01T00:00:00Z",
                "updated": "0001-01-01T00:00:00Z",
                "replies": {
                    "actor": {
                        "publicKey": {},
                        "restricted": false
                    }
                }
            }
        ],
        "published": "2022-08-10T01:32:56.643179935Z",
        "updated": "2022-08-10T01:32:56.643179985Z",
        "replies": {
            "actor": {
                "publicKey": {},
                "restricted": false
            }
        },
        "to": [
            ""
        ]
    }
}

(blank strings in to is hopefully an unrelated bug and probably caused by me in #69; awoo is returning 200 OK and an empty response for /board/followers curl tells me it works fine)

The created Note indeed exists however, and is still in a reply to NaN:

{
    "@context": "https://www.w3.org/ns/activitystreams",
    "actor": {
        "id": "https://usagi.reisen/g",
        "publicKey": {},
        "restricted": false
    },
    "orderedItems": [
        {
            "type": "Note",
            "id": "https://usagi.reisen/g/4EIW0DER",
            "actor": "https://usagi.reisen/g",
            "content": "\u003e\u003ehttp://awoobbsamzdzpji2etemlbj2xvugsljyqwfcltd2jiirbdjmicgxeiid.onion/g/AEBCB01B\r\nDIY or DIE\r\n\r\n",
            "inReplyTo": [
                {
                    "id": "NaN",
                    "published": "0001-01-01T00:00:00Z",
                    "updated": "0001-01-01T00:00:00Z",
                    "replies": {
                        "actor": {
                            "publicKey": {},
                            "restricted": false
                        }
                    }
                }
            ],
            "preview": {
                "type": "Tombstone",
                "preview": {
                    "published": "0001-01-01T00:00:00Z",
                    "updated": "0001-01-01T00:00:00Z",
                    "replies": {
                        "actor": {
                            "publicKey": {},
                            "restricted": false
                        }
                    }
                },
                "published": "0001-01-01T00:00:00Z",
                "updated": "0001-01-01T00:00:00Z",
                "href": "https://usagi.reisen/static/notfound.png",
                "mediatype": "image/png"
            },
            "published": "2022-08-10T01:32:56.64318Z",
            "updated": "2022-08-10T01:32:56.64318Z",
            "attachment": [
                {
                    "type": "Tombstone",
                    "published": "0001-01-01T00:00:00Z",
                    "updated": "0001-01-01T00:00:00Z",
                    "replies": {
                        "actor": {
                            "publicKey": {},
                            "restricted": false
                        }
                    },
                    "href": "https://usagi.reisen/static/notfound.png",
                    "mediatype": "image/png"
                }
            ],
            "replies": {
                "actor": {
                    "publicKey": {},
                    "restricted": false
                }
            }
        }
    ]
}

I doubt 6de8273150a2d8314c8c9535e4c7259602ce8047 mattered, and the actual problem exists further down the code.

ghost commented 2 years ago

I have traced the problem to poopchan servers possibly causing the problem- simply follow the plumbing and it becomes quite obvious.

FChannel0 commented 2 years ago

yep its annoying. havent found the cause but posting from mobile it happens a good bit. i never had the issue posting from desktop. it was persistent before that commit referenced.