Skip to content

Commit

Permalink
Merge tag '1.2.7'
Browse files Browse the repository at this point in the history
Fedify 1.2.7
  • Loading branch information
dahlia committed Nov 22, 2024
2 parents 006c410 + bb86eaf commit 6be10f1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
40 changes: 39 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ To be released.
[#162]: https://github.com/dahlia/fedify/issues/162


Version 1.2.7
-------------

Released on December 22, 2024.

- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]


Version 1.2.6
-------------

Expand Down Expand Up @@ -249,6 +258,15 @@ Released on October 31, 2024.
[#118]: https://github.com/dahlia/fedify/issues/118


Version 1.1.7
-------------

Released on November 22, 2024.

- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]


Version 1.1.6
-------------

Expand Down Expand Up @@ -471,6 +489,15 @@ Released on October 20, 2024.
[#150]: https://github.com/dahlia/fedify/issues/150


Version 1.0.11
--------------

Released on December 22, 2024.

- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]


Version 1.0.10
--------------

Expand Down Expand Up @@ -812,10 +839,21 @@ Released on September 26, 2024.
[#137]: https://github.com/dahlia/fedify/issues/137


Version 0.15.9
--------------

Released on November 22, 2024.

- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]

[#166]: https://github.com/dahlia/fedify/issues/166


Version 0.15.8
--------------

Released on November 159, 2024.
Released on November 19, 2024.

- Fix a bug where `Actor`'s `inbox` and `outbox` properties had not been
able to be set to an `OrderedCollectionPage` object, even though it is
Expand Down
7 changes: 5 additions & 2 deletions src/webfinger/lookup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ test("lookupWebFinger()", async (t) => {

mf.mock(
"GET@/.well-known/webfinger",
(req) =>
Response.redirect(new URL("/.well-known/webfinger2", req.url), 302),
(_) =>
new Response("", {
status: 302,
headers: { Location: "/.well-known/webfinger2" },
}),
);
mf.mock(
"GET@/.well-known/webfinger2",
Expand Down
5 changes: 4 additions & 1 deletion src/webfinger/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export async function lookupWebFinger(
response.status >= 300 && response.status < 400 &&
response.headers.has("Location")
) {
url = new URL(response.headers.get("Location")!);
url = new URL(
response.headers.get("Location")!,
response.url == null || response.url === "" ? url : response.url,
);
continue;
}
if (!response.ok) {
Expand Down

0 comments on commit 6be10f1

Please sign in to comment.