Unverified Commit e8333ad9 authored by Hong Minhee's avatar Hong Minhee
Browse files

Merge tag '1.6.7' into 1.7-maintenance

Fedify 1.6.7
parents aa8024ef d9421b08
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - run: deno task cache
      working-directory: ${{ github.workspace }}/fedify/
    - run: deno task test --coverage=.cov --junit-path=.test-report.xml
@@ -69,7 +69,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
@@ -95,7 +95,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
@@ -120,7 +120,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
@@ -142,7 +142,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - run: deno task hooks:pre-commit

  release-test:
@@ -160,7 +160,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
@@ -200,7 +200,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
@@ -355,7 +355,7 @@ jobs:
        ref: ${{ github.event.pull_request.head.sha }}
    - uses: denoland/setup-deno@v2
      with:
        deno-version: v2.x
        deno-version: "2.4.1"  # FIXME: https://github.com/fedify-dev/fedify/issues/303
    - run: deno task codegen
      working-directory: ${{ github.workspace }}/fedify/
    - uses: denoland/deployctl@v1
+16 −0
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ Version 1.7.6

To be released.

 -  Fixed `doubleKnock()` to properly handle redirects with path-only `Location`
    headers by resolving them relative to the original request URL.
    [[#324] by Fabien O'Carroll]


Version 1.7.5
-------------
@@ -92,6 +96,18 @@ Released on June 25, 2025.
[#252]: https://github.com/fedify-dev/fedify/pull/252


Version 1.6.7
-------------

Released on July 24, 2025.

 -  Fixed `doubleKnock()` to properly handle redirects with path-only `Location`
    headers by resolving them relative to the original request URL.
    [[#324] by Fabien O'Carroll]

[#324]: https://github.com/fedify-dev/fedify/pull/324


Version 1.6.6
-------------

+40 −0
Original line number Diff line number Diff line
@@ -1935,3 +1935,43 @@ test("doubleKnock() regression test for TypeError: unusable bug #294", async ()

  fetchMock.hardReset();
});

test("doubleKnock() regression test for redirect handling bug", async () => {
  // This test reproduces the bug where the redirect handling in doubleKnock
  // would throw for a path only Location header

  fetchMock.spyGlobal();

  fetchMock.post("https://example.com/inbox-retry-redirect", (_cl) => {
    return new Response(null, {
      status: 302,
      headers: {
        location: "/final-destination",
      },
    });
  });

  fetchMock.post("https://example.com/final-destination", () => {
    return new Response("Success", { status: 200 });
  });

  const request = new Request("https://example.com/inbox-retry-redirect", {
    method: "POST",
    body: "Test activity content",
    headers: {
      "Content-Type": "application/activity+json",
    },
  });

  const response = await doubleKnock(
    request,
    {
      keyId: rsaPublicKey2.id!,
      privateKey: rsaPrivateKey2,
    },
  );

  assertEquals(response.status, 200);

  fetchMock.hardReset();
});
+2 −1
Original line number Diff line number Diff line
@@ -1233,7 +1233,8 @@ function createRedirectRequest(
  location: string,
  body: ArrayBuffer | undefined,
): Request {
  return new Request(location, {
  const url = new URL(location, request.url);
  return new Request(url, {
    method: request.method,
    headers: request.headers,
    body,
+1 −1
Original line number Diff line number Diff line
[tools]
bun = "latest"
deno = "2"
deno = "2.4.1"  # Temporarily pinned to a specific version; see also #303
node = "22"
"npm:pnpm" = "latest"