Loading CHANGES.md +5 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,11 @@ To be released. `acct:` URIs with a host having a port number. [[#218], [#219] by Revath S Kumar] - Fixed a server error thrown when an invalid URL was passed to the `base-url` parameter of the followers collection. [[#217]] [#217]: https://github.com/fedify-dev/fedify/issues/217 Version 1.0.20 -------------- Loading src/federation/middleware.ts +6 −2 Original line number Diff line number Diff line Loading @@ -1910,8 +1910,12 @@ export class FederationImpl<TContextData> implements Federation<TContextData> { case "followers": { let baseUrl = url.searchParams.get("base-url"); if (baseUrl != null) { const u = new URL(baseUrl); baseUrl = `${u.origin}/`; try { baseUrl = `${new URL(baseUrl).origin}/`; } catch { // If base-url is invalid, set to null to behave as if it wasn't provided baseUrl = null; } } return await handleCollection(request, { name: "followers", Loading Loading
CHANGES.md +5 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,11 @@ To be released. `acct:` URIs with a host having a port number. [[#218], [#219] by Revath S Kumar] - Fixed a server error thrown when an invalid URL was passed to the `base-url` parameter of the followers collection. [[#217]] [#217]: https://github.com/fedify-dev/fedify/issues/217 Version 1.0.20 -------------- Loading
src/federation/middleware.ts +6 −2 Original line number Diff line number Diff line Loading @@ -1910,8 +1910,12 @@ export class FederationImpl<TContextData> implements Federation<TContextData> { case "followers": { let baseUrl = url.searchParams.get("base-url"); if (baseUrl != null) { const u = new URL(baseUrl); baseUrl = `${u.origin}/`; try { baseUrl = `${new URL(baseUrl).origin}/`; } catch { // If base-url is invalid, set to null to behave as if it wasn't provided baseUrl = null; } } return await handleCollection(request, { name: "followers", Loading