Skip to content

Commit 600b985

Browse files
authored
chore: prepare v4.16.1 security release (#3186)
* chore: prepare v4.16.1 security release * docs: explain v4 security release requirements and defaults
1 parent 3fb0ba7 commit 600b985

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎.github/workflows/echo.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
fail_ci_if_error: false
5151

5252
benchmark:
53+
if: github.event_name == 'pull_request'
5354
needs: test
5455
name: Benchmark comparison
5556
runs-on: ubuntu-latest
@@ -76,12 +77,12 @@ jobs:
7677
- name: Run Benchmark (Previous)
7778
run: |
7879
cd previous
79-
go test -run="-" -bench=".*" -count=8 ./... > benchmark.txt
80+
go test -run="-" -bench=".*" -benchtime=100ms -count=8 ./... > benchmark.txt
8081
8182
- name: Run Benchmark (New)
8283
run: |
8384
cd new
84-
go test -run="-" -bench=".*" -count=8 ./... > benchmark.txt
85+
go test -run="-" -bench=".*" -benchtime=100ms -count=8 ./... > benchmark.txt
8586
8687
- name: Run Benchstat
8788
run: |

‎README.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ Click [here](https://github.com/sponsors/labstack) for more information on spons
6161
// go get github.com/labstack/echo/{version}
6262
go get github.com/labstack/echo/v4
6363
```
64-
Latest version of Echo supports last four Go major [releases](https://go.dev/doc/devel/release) and might work with older versions.
64+
Echo v4.16.1 requires Go 1.26 or later so it can use patched `golang.org/x/` dependencies. Use a supported, patched Go toolchain when building applications.
65+
66+
### Security defaults in v4.16.1
67+
68+
`BodyDump` captures at most 5 MiB of the request and 5 MiB of the response by default. The application and client still receive the complete bodies. Configure `BodyDumpConfig.MaxRequestBytes` and `MaxResponseBytes` to change the capture limits; `-1` disables a limit.
69+
70+
`Decompress` limits decompressed request bodies to 100 MiB by default. Reading beyond the limit returns HTTP 413, including through JSON and XML binding. Configure `DecompressConfig.MaxDecompressedSize` to change the limit; `-1` disables it. Apply any smaller application body limit after decompression.
71+
72+
The proxy now validates WebSocket upgrade responses, closes both WebSocket connections when either side disconnects, and removes incoming `Forwarded` headers. Backends should use the proxy's validated forwarding headers and enforce their own authorization.
6573

6674
### Example
6775

‎echo.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ const (
285285

286286
const (
287287
// Version of Echo
288-
Version = "4.16.0"
288+
Version = "4.16.1"
289289
website = "https://echo.labstack.com"
290290
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
291291
banner = `

0 commit comments

Comments
 (0)