diff options
| author | dakkar <dakkar@thenautilus.net> | 2025-06-01 14:06:04 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2025-06-01 14:06:04 +0100 |
| commit | 034bfc02bdbe881d8759c3ed4712b5950fbdfbb4 (patch) | |
| tree | 7ff183476be3451b22ce9ffc29cb4980a7df621b /packages/backend/src | |
| parent | merge: Factor out TransitionGroup dynamic switching into a dedicated componen... (diff) | |
| download | sharkey-034bfc02bdbe881d8759c3ed4712b5950fbdfbb4.tar.gz sharkey-034bfc02bdbe881d8759c3ed4712b5950fbdfbb4.tar.bz2 sharkey-034bfc02bdbe881d8759c3ed4712b5950fbdfbb4.zip | |
allow fragments in AP ID URLs - fixes polls
our own `renderVote` generates IDs like
`${this.config.url}/users/${user.id}#votes/${vote.id}/activity`
also `renderUpdate` generates
`${this.config.url}/users/${user.id}#updates/${new Date().getTime()}`
so we can't reject IDs with fragments
Diffstat (limited to 'packages/backend/src')
| -rw-r--r-- | packages/backend/src/core/activitypub/ApUtilityService.ts | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/packages/backend/src/core/activitypub/ApUtilityService.ts b/packages/backend/src/core/activitypub/ApUtilityService.ts index c3958cdf42..3c125c6cd9 100644 --- a/packages/backend/src/core/activitypub/ApUtilityService.ts +++ b/packages/backend/src/core/activitypub/ApUtilityService.ts @@ -80,7 +80,6 @@ export class ApUtilityService { /** * Verifies that a provided URL is in a format acceptable for federation. * @throws {IdentifiableError} If URL cannot be parsed - * @throws {IdentifiableError} If URL contains a fragment * @throws {IdentifiableError} If URL is not HTTPS */ public assertApUrl(url: string | URL): void { @@ -93,11 +92,6 @@ export class ApUtilityService { } } - // Hash component breaks federation - if (url.hash) { - throw new IdentifiableError('0bedd29b-e3bf-4604-af51-d3352e2518af', `invalid AP url ${url}: contains a fragment (#)`); - } - // Must be HTTPS if (!this.checkHttps(url)) { throw new IdentifiableError('0bedd29b-e3bf-4604-af51-d3352e2518af', `invalid AP url ${url}: unsupported protocol ${url.protocol}`); |