-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Comparing changes
Open a pull request
base repository: gofiber/fiber
base: v2.52.13
head repository: gofiber/fiber
compare: v2.52.14
- 12 commits
- 7 files changed
- 3 contributors
Commits on Jul 3, 2026
-
fix(proxy): overwrite X-Real-IP in BalancerForward (GHSA-gcfq-8gqf-4876)
Backport of the v3 fix (1403cc8, PR #4260) for GHSA-gcfq-8gqf-4876 / CVE-2026-45045 to the v2 branch: Header.Add kept an attacker-supplied X-Real-IP as the first header value, so upstream servers reading the first value trusted the spoofed IP. Header.Set overwrites it with the real client IP (c.IP()). Adds the corresponding regression test adapted to v2's *fiber.Ctx handler signature, and fixes the same insecure pattern in the proxy middleware doc example.
Configuration menu - View commit details
-
Copy full SHA for 7c064e3 - Browse repository at this point
Copy the full SHA 7c064e3View commit details -
ci(test): stabilize v2 tests; drop macOS, move -race to a non-blockin…
…g job The v2 test matrix has been red on newer Go versions and non-Linux platforms. Root causes are systemic and cannot be fixed by CI config alone without taking the flaky bits out of the merge gate: - The suite has pre-existing flaky data races (e.g. the package-global fiber.Get client in Test_Client_UserAgent) and order-dependent tests. A -race abort (os.Exit) fails the whole run; neither the old nick-fields/retry nor gotestsum's per-test rerun-fails can mask it (and gotestsum additionally refuses to rerun because the recover test prints a literal "panic:" via debug.Stack, which it treats as a suspected panic). - The current macos-latest runners (macOS 26, arm64) abort binaries built by Go <= 1.23 with "dyld: missing LC_UUID load command", so v2's entire supported Go range fails to even launch its test binaries there. Changes: - Blocking Build job runs `go test ./... -count=1` (no -race, no -shuffle; -shuffle exposes the order-dependent tests) under nick-fields/retry, which has no panic heuristic to trip over. - Add a separate non-blocking Race job (continue-on-error) running `go test -race -shuffle=on` so the pre-existing races stay visible without blocking merges. Fold -race back into Build once they are fixed (#4496 fixes the first one). - Raise the matrix floor to Go 1.20 to match the module's go.mod (go 1.20). - Drop macOS from the matrix: v2's Go range cannot run on the macOS 26 runners (dyld/LC_UUID). ubuntu and windows cover the matrix. - Add fail-fast: false and explicit job timeouts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for d78e8c2 - Browse repository at this point
Copy the full SHA d78e8c2View commit details -
ci: drop redundant advanced CodeQL workflow (default setup covers it)
The repo has CodeQL "default setup" enabled, so the advanced codeql-analysis.yml workflow's SARIF upload is rejected on every run with "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled", leaving a permanently red "Analyse" check on every v2 PR. The main branch already removed this workflow for the same reason; default setup keeps scanning, so there is no loss of coverage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 2fbfa7d - Browse repository at this point
Copy the full SHA 2fbfa7dView commit details -
ci: set least-privilege GITHUB_TOKEN permissions on the test workflow
CodeQL flagged that the workflow does not restrict the GITHUB_TOKEN. Both jobs only check out the repo and run tests, so contents: read is sufficient (matches the v3 test workflow). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 493b955 - Browse repository at this point
Copy the full SHA 493b955View commit details -
test(proxy): fix data race and flaky deadline test in v2 CI
Two pre-existing issues in middleware/proxy made v2 CI red under `go test -race` on newer Go versions and Windows: 1. Data race: Test_Proxy_Forward_WithTlsConfig called WithTlsConfig(), which mutates the field client.TLSConfig on the package-global client with no synchronization against fasthttp's concurrent read of that field from parallel proxy tests. Swap the whole global client via WithClient(&fasthttp.Client{TLSConfig: ...}) instead (pointer swap under the existing lock), mirroring the v3 fix. The public WithTlsConfig API is left untouched. 2. Flaky timing: Test_Proxy_DoDeadline_PastDeadline used a 1s DoDeadline deadline equal to app.Test's default 1000ms timeout, so two coincident timers raced. Bump the deadline to 2s so app.Test's timeout fires first deterministically (same approach as v3). Test-only change, no production or API changes. Verified 12/12 green with `-race -shuffle=on`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Configuration menu - View commit details
-
Copy full SHA for bd6da95 - Browse repository at this point
Copy the full SHA bd6da95View commit details -
Merge pull request #4497 from gofiber/ci/v2-gotestsum-rerun-fails
fix(proxy) + ci: fix proxy data race and get the v2 CI green
Configuration menu - View commit details
-
Copy full SHA for 79d3444 - Browse repository at this point
Copy the full SHA 79d3444View commit details -
Configuration menu - View commit details
-
Copy full SHA for da6126b - Browse repository at this point
Copy the full SHA da6126bView commit details -
test(ctx): restore global parser decoder after SetParserDecoder tests
The *_WithSetParserDecoder tests (and Test_Ctx_BodyParser_IndexTooLarge) call the package-global SetParserDecoder() with a custom ParserConfig but never restore the default. Because they run in the serial phase, the mutated global decoder leaks into the parallel Test_Ctx_QueryParser / Test_Ctx_ReqHeaderParser tests, which then decode with the wrong config and fail. Normal source order happened to hide it; go test -shuffle exposes it deterministically (and it is why the -race CI job was red). Restore the package default (IgnoreUnknownKeys: true, ZeroEmpty: true) via defer in each mutating test. Verified 5x green under `go test . -run 'Test_Ctx_(QueryParser|ReqHeaderParser|BodyParser)' -race -shuffle=on` and across shuffle seeds that previously failed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 396416e - Browse repository at this point
Copy the full SHA 396416eView commit details -
Merge pull request #4498 from gofiber/fix/v2-parser-decoder-global-leak
test(ctx): restore global parser decoder after SetParserDecoder tests (fixes shuffle/-race flakes)
Configuration menu - View commit details
-
Copy full SHA for 6772121 - Browse repository at this point
Copy the full SHA 6772121View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b071e1 - Browse repository at this point
Copy the full SHA 1b071e1View commit details -
Merge pull request #4495 from terraincognita07/backport-v2-balancer-f…
…orward-x-real-ip 🐛 fix(proxy): backport BalancerForward X-Real-IP overwrite fix to v2
Configuration menu - View commit details
-
Copy full SHA for 33c9501 - Browse repository at this point
Copy the full SHA 33c9501View commit details
Commits on Jul 6, 2026
-
Configuration menu - View commit details
-
Copy full SHA for a74500f - Browse repository at this point
Copy the full SHA a74500fView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v2.52.13...v2.52.14