From bb3d7109271a678487208df1cff3a11e28ceedbc Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 16 Mar 2025 10:49:16 -0400 Subject: allow unsigned fetch for all system users --- packages/backend/migration/1740162088574-add_unsignedFetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/backend/migration') diff --git a/packages/backend/migration/1740162088574-add_unsignedFetch.js b/packages/backend/migration/1740162088574-add_unsignedFetch.js index 855a3796aa..0744e68dfa 100644 --- a/packages/backend/migration/1740162088574-add_unsignedFetch.js +++ b/packages/backend/migration/1740162088574-add_unsignedFetch.js @@ -12,8 +12,8 @@ export class AddUnsignedFetch1740162088574 { await queryRunner.query(`CREATE TYPE "public"."user_allowunsignedfetch_enum" AS ENUM('never', 'always', 'essential', 'staff')`); await queryRunner.query(`ALTER TABLE "user" ADD "allowUnsignedFetch" "public"."user_allowunsignedfetch_enum" NOT NULL DEFAULT 'staff'`); - // Special one-time migration: allow unauthorized fetch for instance actor - await queryRunner.query(`UPDATE "user" SET "allowUnsignedFetch" = 'always' WHERE "username" = 'instance.actor' AND "host" IS null`); + // Special one-time migration: allow unauthorized fetch for system accounts + await queryRunner.query(`UPDATE "user" SET "allowUnsignedFetch" = 'always' WHERE "username" LIKE '%.%' AND "host" IS null`); // Special one-time migration: convert legacy config "" to meta setting "" const config = await loadConfig(); -- cgit v1.2.3-freya