From e94e7024297746c99c30ce91694475f1face90b6 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Thu, 20 Apr 2023 22:26:26 -0400 Subject: [PATCH] prohibit updating alsoKnownAs after moving --- packages/backend/test/e2e/move.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/backend/test/e2e/move.ts b/packages/backend/test/e2e/move.ts index aa5c932f10..1d9fb07ee5 100644 --- a/packages/backend/test/e2e/move.ts +++ b/packages/backend/test/e2e/move.ts @@ -350,7 +350,6 @@ describe('Account Move', () => { '/gallery/posts/like', '/gallery/posts/unlike', '/gallery/posts/update', - '/i/update', '/i/move', '/notes/create', '/notes/polls/vote', @@ -396,5 +395,15 @@ describe('Account Move', () => { assert.strictEqual(res.body.error.code, 'YOUR_ACCOUNT_MOVED'); assert.strictEqual(res.body.error.id, '56f20ec9-fd06-4fa5-841b-edd6d7d4fa31'); }); + + test('Prohibit updating alsoKnownAs after moving', async () => { + const res = await api('/i/update', { + alsoKnownAs: [`@eve@${url.hostname}`], + }, alice); + + assert.strictEqual(res.status, 403); + assert.strictEqual(res.body.error.code, 'YOUR_ACCOUNT_MOVED'); + assert.strictEqual(res.body.error.id, '56f20ec9-fd06-4fa5-841b-edd6d7d4fa31'); + }); }); });