diff options
| author | 饺子w (Yumechi) <35571479+eternal-flame-AD@users.noreply.github.com> | 2025-03-12 12:39:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-12 12:39:24 +0000 |
| commit | e5d117dc98b725f908402638754f8643bbbeef90 (patch) | |
| tree | d9a08f887d8ce217343ba5b097975de4c984d1d5 /packages/backend/src/core/HttpRequestService.ts | |
| parent | enhance(frontend): make deck profiles syncable (diff) | |
| download | sharkey-e5d117dc98b725f908402638754f8643bbbeef90.tar.gz sharkey-e5d117dc98b725f908402638754f8643bbbeef90.tar.bz2 sharkey-e5d117dc98b725f908402638754f8643bbbeef90.zip | |
fix(backend): tighten an overly relaxed criteria and remove capability of matching multiple final URLs in URL authority checking (#15655)
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
Diffstat (limited to 'packages/backend/src/core/HttpRequestService.ts')
| -rw-r--r-- | packages/backend/src/core/HttpRequestService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts index 13d8f7f43b..3ddfe52045 100644 --- a/packages/backend/src/core/HttpRequestService.ts +++ b/packages/backend/src/core/HttpRequestService.ts @@ -16,7 +16,7 @@ import type { Config } from '@/config.js'; import { StatusError } from '@/misc/status-error.js'; import { bindThis } from '@/decorators.js'; import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js'; -import { assertActivityMatchesUrls, FetchAllowSoftFailMask } from '@/core/activitypub/misc/check-against-url.js'; +import { assertActivityMatchesUrl, FetchAllowSoftFailMask } from '@/core/activitypub/misc/check-against-url.js'; import type { IObject } from '@/core/activitypub/type.js'; import type { Response } from 'node-fetch'; import type { URL } from 'node:url'; @@ -265,7 +265,7 @@ export class HttpRequestService { const finalUrl = res.url; // redirects may have been involved const activity = await res.json() as IObject; - assertActivityMatchesUrls(url, activity, [finalUrl], allowSoftfail); + assertActivityMatchesUrl(url, activity, finalUrl, allowSoftfail); return activity; } |