Note updates are rejected if they add a poll to an existing note
What happened?
When receiving an Update(Question(Note)) for a note that doesn't already have a poll, we reject the entire activity with a security error.
What did you expect to happen?
The note should have been updated to attach a new poll.
Version
2024.10.0-dev
Instance
enby.life
What type of issue is this? (If this happens on your device and has to do with the user interface, it's client-side. If this happens on either with the API or the backend, or you got a server-side error in the client, it's server-side.)
backend
How do you deploy Sharkey on your server? (Server-side issues only)
Build from source
What operating system are you using? (Server-side issues only)
Ubuntu Server 22.04
Relevant log output
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ERR * [queue inbox] failed(Error: Question is not registered (no poll): https://floofy.tech/users/mynotaurus/statuses/113478052782545689) id=3720242 attempts=6/8 age=64m activity=https://floofy.tech/users/mynotaurus/statuses/113478052782545689#updates/1731540522 {
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: job: {
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: info: 'id=3720242 attempts=6/8 age=64m',
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: data: { activity: [Object], signature: [Object] },
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: failedReason: 'Question is not registered (no poll): https://floofy.tech/users/mynotaurus/statuses/113478052782545689'
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: },
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: e: {
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: stack: 'Error: Question is not registered (no poll): https://floofy.tech/users/mynotaurus/statuses/113478052782545689\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at ApQuestionService.updateQuestion (file:///home/calckey/calckey/packages/backend/built/core/activitypub/models/ApQuestionService.js:73:33)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async ApInboxService.update (file:///home/calckey/calckey/packages/backend/built/core/activitypub/ApInboxService.js:672:13)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async ApInboxService.performOneActivity (file:///home/calckey/calckey/packages/backend/built/core/activitypub/ApInboxService.js:158:20)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async ApInboxService.performActivity (file:///home/calckey/calckey/packages/backend/built/core/activitypub/ApInboxService.js:139:22)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async InboxProcessorService.process (file:///home/calckey/calckey/packages/backend/built/queue/processors/InboxProcessorService.js:194:28)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async Worker.processJob (/home/calckey/calckey/node_modules/.pnpm/bullmq@5.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:455:28)\n' +
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: ' at async Worker.retryIfFailed (/home/calckey/calckey/node_modules/.pnpm/bullmq@5.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:640:24)',
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: message: 'Question is not registered (no poll): https://floofy.tech/users/mynotaurus/statuses/113478052782545689',
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: name: 'Error'
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: }
Nov 14 00:35:53 vps-426b63f4 "enby.life@worker"[3126410]: }
Contribution Guidelines By submitting this issue, you agree to follow our Contribution Guidelines
- I agree to follow this project's Contribution Guidelines
- I have searched the issue tracker for similar issues, and this is not a duplicate.