Skip to content

Commit 6be10f1

Browse files
committed
Merge tag '1.2.7'
Fedify 1.2.7
2 parents 006c410 + bb86eaf commit 6be10f1

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

CHANGES.md

+39-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ To be released.
6868
[#162]: https://github.com/dahlia/fedify/issues/162
6969

7070

71+
Version 1.2.7
72+
-------------
73+
74+
Released on December 22, 2024.
75+
76+
- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
77+
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]
78+
79+
7180
Version 1.2.6
7281
-------------
7382

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

251260

261+
Version 1.1.7
262+
-------------
263+
264+
Released on November 22, 2024.
265+
266+
- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
267+
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]
268+
269+
252270
Version 1.1.6
253271
-------------
254272

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

473491

492+
Version 1.0.11
493+
--------------
494+
495+
Released on December 22, 2024.
496+
497+
- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
498+
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]
499+
500+
474501
Version 1.0.10
475502
--------------
476503

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

814841

842+
Version 0.15.9
843+
--------------
844+
845+
Released on November 22, 2024.
846+
847+
- Fixed a bug where `lookupWebFinger()` function had thrown a `TypeError`
848+
when the *.well-known/webfinger* redirects to a relative URI. [[#166]]
849+
850+
[#166]: https://github.com/dahlia/fedify/issues/166
851+
852+
815853
Version 0.15.8
816854
--------------
817855

818-
Released on November 159, 2024.
856+
Released on November 19, 2024.
819857

820858
- Fix a bug where `Actor`'s `inbox` and `outbox` properties had not been
821859
able to be set to an `OrderedCollectionPage` object, even though it is

src/webfinger/lookup.test.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@ test("lookupWebFinger()", async (t) => {
7676

7777
mf.mock(
7878
"GET@/.well-known/webfinger",
79-
(req) =>
80-
Response.redirect(new URL("/.well-known/webfinger2", req.url), 302),
79+
(_) =>
80+
new Response("", {
81+
status: 302,
82+
headers: { Location: "/.well-known/webfinger2" },
83+
}),
8184
);
8285
mf.mock(
8386
"GET@/.well-known/webfinger2",

src/webfinger/lookup.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export async function lookupWebFinger(
7373
response.status >= 300 && response.status < 400 &&
7474
response.headers.has("Location")
7575
) {
76-
url = new URL(response.headers.get("Location")!);
76+
url = new URL(
77+
response.headers.get("Location")!,
78+
response.url == null || response.url === "" ? url : response.url,
79+
);
7780
continue;
7881
}
7982
if (!response.ok) {

0 commit comments

Comments
 (0)