mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
merge: allow fragments in AP ID URLs - fixes polls (!1076)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1076 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
a7ba809df4
1 changed files with 0 additions and 6 deletions
|
@ -80,7 +80,6 @@ export class ApUtilityService {
|
||||||
/**
|
/**
|
||||||
* Verifies that a provided URL is in a format acceptable for federation.
|
* Verifies that a provided URL is in a format acceptable for federation.
|
||||||
* @throws {IdentifiableError} If URL cannot be parsed
|
* @throws {IdentifiableError} If URL cannot be parsed
|
||||||
* @throws {IdentifiableError} If URL contains a fragment
|
|
||||||
* @throws {IdentifiableError} If URL is not HTTPS
|
* @throws {IdentifiableError} If URL is not HTTPS
|
||||||
*/
|
*/
|
||||||
public assertApUrl(url: string | URL): void {
|
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
|
// Must be HTTPS
|
||||||
if (!this.checkHttps(url)) {
|
if (!this.checkHttps(url)) {
|
||||||
throw new IdentifiableError('0bedd29b-e3bf-4604-af51-d3352e2518af', `invalid AP url ${url}: unsupported protocol ${url.protocol}`);
|
throw new IdentifiableError('0bedd29b-e3bf-4604-af51-d3352e2518af', `invalid AP url ${url}: unsupported protocol ${url.protocol}`);
|
||||||
|
|
Loading…
Add table
Reference in a new issue