Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed #151

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 20, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/labstack/echo/v4 v4.1.16 -> v4.9.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2022-40083

Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the Static Handler component. This vulnerability can be leveraged by attackers to cause a Server-Side Request Forgery (SSRF). Version 4.9.0 contains a patch for the issue.

CVE-2020-36565

Due to improper sanitization of user input on Windows, the static file handler allows for directory traversal, allowing an attacker to read files outside of the target directory that the server has permission to read.


Release Notes

labstack/echo (github.com/labstack/echo/v4)

v4.9.0

Compare Source

Security

  • Fix open redirect vulnerability in handlers serving static directories (e.Static, e.StaticFs, echo.StaticDirectoryHandler) #​2260

Enhancements

  • Allow configuring ErrorHandler in CSRF middleware #​2257
  • Replace HTTP method constants in tests with stdlib constants #​2247

v4.8.0

Compare Source

Most notable things

You can now add any arbitrary HTTP method type as a route #​2237

e.Add("COPY", "/*", func(c echo.Context) error 
  return c.String(http.StatusOK, "OK COPY")
})

You can add custom 404 handler for specific paths #​2217

e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })

g := e.Group("/images")
g.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })

Enhancements

  • Add new value binding methods (UnixTimeMilli,TextUnmarshaler,JSONUnmarshaler) to Valuebinder #​2127
  • Refactor: body_limit middleware unit test #​2145
  • Refactor: Timeout mw: rework how test waits for timeout. #​2187
  • BasicAuth middleware returns 500 InternalServerError on invalid base64 strings but should return 400 #​2191
  • Refactor: duplicated findStaticChild process at findChildWithLabel #​2176
  • Allow different param names in different methods with same path scheme #​2209
  • Add support for registering handlers for different 404 routes #​2217
  • Middlewares should use errors.As() instead of type assertion on HTTPError #​2227
  • Allow arbitrary HTTP method types to be added as routes #​2237

v4.7.2

Compare Source

Fixes

  • Fix nil pointer exception when calling Start again after address binding error #​2131
  • Fix CSRF middleware not being able to extract token from multipart/form-data form #​2136
  • Fix Timeout middleware write race #​2126

Enhancements

  • Recover middleware should not log panic for aborted handler #​2134

v4.7.1

Compare Source

Fixes

  • Fix e.Static, .File(), c.Attachment() being picky with paths starting with ./, ../ and / after 4.7.0 introduced echo.Filesystem support (Go1.16+) #​2123

Enhancements

v4.7.0

Compare Source

Enhancements

  • Add JWT, KeyAuth, CSRF multivalue extractors #​2060
  • Add LogErrorFunc to recover middleware #​2072
  • Add support for HEAD method query params binding #​2027
  • Improve filesystem support with echo.FileFS, echo.StaticFS, group.FileFS, group.StaticFS #​2064

Fixes

General

  • Add cache-control and connection headers #​2103
  • Add Retry-After header constant #​2078
  • Upgrade go directive in go.mod to 1.17 #​2049
  • Add Pagoda #​2077 and Souin #​2069 to 3rd-party middlewares in README

v4.6.3

Compare Source

Fixes

  • Fixed Echo version number in greeting message which was not incremented to 4.6.2 #​2066

v4.6.2

Compare Source

Fixes

  • Fixed route containing escaped colon should be matchable but is not matched to request path #​2047
  • Fixed a problem that returned wrong content-encoding when the gzip compressed content was empty. #​1921
  • Update (test) dependencies #​2021

Enhancements

  • Add support for configurable target header for the request_id middleware #​2040
  • Change decompress middleware to use stream decompression instead of buffering #​2018
  • Documentation updates

v4.6.1

Compare Source

Enhancements

  • Add start time to request logger middleware values #​1991

v4.6.0

Compare Source

Introduced a new request logger middleware
to help with cases when you want to use some other logging library in your application.

Fixes

  • fix timeout middleware warning: superfluous response.WriteHeader #​1905

Enhancements

  • Add Cookie to KeyAuth middleware's KeyLookup #​1929
  • JWT middleware should ignore case of auth scheme in request header #​1951
  • Refactor default error handler to return first if response is already committed #​1956
  • Added request logger middleware which helps to use custom logger library for logging requests. #​1980
  • Allow escaping of colon in route path so Google Cloud API "custom methods" could be implemented #​1988

v4.5.0

Compare Source

Important notes

A BREAKING CHANGE is introduced for JWT middleware users.
The JWT library used for the JWT middleware had to be changed from github.com/dgrijalva/jwt-go to
github.com/golang-jwt/jwt due former library being unmaintained and affected by security
issues.
The github.com/golang-jwt/jwt project is a drop-in replacement, but supports only the latest 2 Go versions.
So for JWT middleware users Go 1.15+ is required. For detailed information please read #​1940

To change the library imports in all .go files in your project replace all occurrences of dgrijalva/jwt-go with golang-jwt/jwt.

For Linux CLI you can use:

find -type f -name "*.go" -exec sed -i "s/dgrijalva\/jwt-go/golang-jwt\/jwt/g" {} \;
go mod tidy

Fixes

  • Change JWT library to github.com/golang-jwt/jwt #​1946

v4.4.0

Compare Source

Fixes

  • Split HeaderXForwardedFor header only by comma #​1878
  • Fix Timeout middleware Context propagation #​1910

Enhancements

  • Bind data using headers as source #​1866
  • Adds JWTConfig.ParseTokenFunc to JWT middleware to allow different libraries implementing JWT parsing. #​1887
  • Adding tests for Echo#Host #​1895
  • Adds RequestIDHandler function to RequestID middleware #​1898
  • Allow for custom JSON encoding implementations #​1880

v4.3.0

Compare Source

Important notes

  • Route matching has improvements for following cases:
    1. Correctly match routes with parameter part as last part of route (with trailing backslash)
    2. Considering handlers when resolving routes and search for matching http method handler
  • Echo minimal Go version is now 1.13.

Fixes

  • When url ends with slash first param route is the match #​1804
  • Router should check if node is suitable as matching route by path+method and if not then continue search in tree #​1808
  • Fix timeout middleware not writing response correctly when handler panics #​1864
  • Fix binder not working with embedded pointer structs #​1861
  • Add Go 1.16 to CI and drop 1.12 specific code #​1850

Enhancements

  • Make KeyFunc public in JWT middleware #​1756
  • Add support for optional filesystem to the static middleware #​1797
  • Add a custom error handler to key-auth middleware #​1847
  • Allow JWT token to be looked up from multiple sources #​1845

v4.2.2

Compare Source

Fixes

  • Allow proxy middleware to use query part in rewrite (#​1802)
  • Fix timeout middleware not sending status code when handler returns an error (#​1805)
  • Fix Bind() when target is array/slice and path/query params complains bind target not being struct (#​1835)
  • Fix panic in redirect middleware on short host name (#​1813)
  • Fix timeout middleware docs (#​1836)

v4.2.1

Compare Source

Important notes

Due to a datarace the config parameters for the newly added timeout middleware required a change.
See the docs.
A performance regression has been fixed, even bringing better performance than before for some routing scenarios.

Fixes

  • Fix performance regression caused by path escaping (#​1777, #​1798, #​1799, aldas)
  • Avoid context canceled errors (#​1789, clwluvw)
  • Improve router to use on stack backtracking (#​1791, aldas, stffabi)
  • Fix panic in timeout middleware not being not recovered and cause application crash (#​1794, aldas)
  • Fix Echo.Serve() not serving on HTTP port correctly when TLSListener is used (#​1785, #​1793, aldas)
  • Apply go fmt (#​1788, Le0tk0k)
  • Uses strings.Equalfold (#​1790, rkilingr)
  • Improve code quality (#​1792, withshubh)

This release was made possible by our contributors:
aldas, clwluvw, lammel, Le0tk0k, maciej-jezierski, rkilingr, stffabi, withshubh

v4.2.0

Compare Source

Important notes

The behaviour for binding data has been reworked for compatibility with echo before v4.1.11 by
enforcing explicit tagging for processing parameters. This may break your code if you
expect combined handling of query/path/form params.
Please see the updated documentation for request and binding

The handling for rewrite rules has been slightly adjusted to expand * to a non-greedy (.*?) capture group. This is only relevant if multiple asterisks are used in your rules.
Please see rewrite and proxy for details.

Security

  • Fix directory traversal vulnerability for Windows (#​1718, little-cui)
  • Fix open redirect vulnerability with trailing slash (#​1771,#​1775 aldas,GeoffreyFrogeye)

Enhancements

  • Add Echo#ListenerNetwork as configuration (#​1667, pafuent)
  • Add ability to change the status code using response beforeFuncs (#​1706, RashadAnsari)
  • Echo server startup to allow data race free access to listener address
  • Binder: Restore pre v4.1.11 behaviour for c.Bind() to use query params only for GET or DELETE methods (#​1727, aldas)
  • Binder: Add separate methods to bind only query params, path params or request body (#​1681, aldas)
  • Binder: New fluent binder for query/path/form parameter binding (#​1717, #​1736, aldas)
  • Router: Performance improvements for missed routes (#​1689, pafuent)
  • Router: Improve performance for Real-IP detection using IndexByte instead of Split (#​1640, imxyb)
  • Middleware: Support real regex rules for rewrite and proxy middleware (#​1767)
  • Middleware: New rate limiting middleware (#​1724, iambenkay)
  • Middleware: New timeout middleware implementation for go1.13+ (#​1743, )
  • Middleware: Allow regex pattern for CORS middleware (#​1623, KlotzAndrew)
  • Middleware: Add IgnoreBase parameter to static middleware (#​1701, lnenad, iambenkay)
  • Middleware: Add an optional custom function to CORS middleware to validate origin (#​1651, curvegrid)
  • Middleware: Support form fields in JWT middleware (#​1704, rkfg)
  • Middleware: Use sync.Pool for (de)compress middleware to improve performance (#​1699, #​1672, pafuent)
  • Middleware: Add decompress middleware to support gzip compressed requests (#​1687, arun0009)
  • Middleware: Add ErrJWTInvalid for JWT middleware (#​1627, juanbelieni)
  • Middleware: Add SameSite mode for CSRF cookies to support iframes (#​1524, pr0head)

Fixes

  • Fix handling of special trailing slash case for partial prefix (#​1741, stffabi)
  • Fix handling of static routes with trailing slash (#​1747)
  • Fix Static files route not working (#​1671, pwli0755, lammel)
  • Fix use of caret(^) in regex for rewrite middleware (#​1588, chotow)
  • Fix Echo#Reverse for Any type routes (#​1695, pafuent)
  • Fix Router#Find panic with infinite loop (#​1661, pafuent)
  • Fix Router#Find panic fails on Param paths (#​1659, pafuent)
  • Fix DefaultHTTPErrorHandler with Debug=true (#​1477, lammel)
  • Fix incorrect CORS headers (#​1669, ulasakdeniz)
  • Fix proxy middleware rewritePath to use url with updated tests (#​1630, arun0009)
  • Fix rewritePath for proxy middleware to use escaped path in (#​1628, arun0009)
  • Remove unless defer (#​1656, imxyb)

General

  • New maintainers for Echo: Roland Lammel (@​lammel) and Pablo Andres Fuente (@​pafuent)
  • Add GitHub action to compare benchmarks (#​1702, pafuent)
  • Binding query/path params and form fields to struct only works for explicit tags (#​1729,#​1734, aldas)
  • Add support for Go 1.15 in CI (#​1683, asahasrabuddhe)
  • Add test for request id to remain unchanged if provided (#​1719, iambenkay)
  • Refactor echo instance listener access and startup to speed up testing (#​1735, aldas)
  • Refactor and improve various tests for binding and routing
  • Run test workflow only for relevant changes (#​1637, #​1636, pofl)
  • Update .travis.yml (#​1662, santosh653)
  • Update README.md with an recents framework benchmark (#​1679, pafuent)

This release was made possible by over 100 commits from more than 20 contributors:
asahasrabuddhe, aldas, AndrewKlotz, arun0009, chotow, curvegrid, iambenkay, imxyb,
juanbelieni, lammel, little-cui, lnenad, pafuent, pofl, pr0head, pwli, RashadAnsari,
rkfg, santosh653, segfiner, stffabi, ulasakdeniz

v4.1.17

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Nov 20, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -d -t ./...
go: downloading github.com/spf13/afero v1.3.1
go: downloading github.com/spf13/cobra v1.0.0
go: downloading github.com/spf13/viper v1.7.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/blang/semver/v4 v4.0.0
go: downloading github.com/rhysd/go-github-selfupdate v1.2.2
go: downloading github.com/comail/colog v0.0.0-20160416085026-fba8e7b1f46c
go: downloading github.com/labstack/echo/v4 v4.9.0
go: downloading github.com/otiai10/copy v1.2.0
go: downloading github.com/rakyll/statik v0.1.7
go: downloading github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c
go: downloading github.com/zserge/lorca v0.1.9
go: downloading gopkg.in/yaml.v2 v2.3.0
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/magiconair/properties v1.8.1
go: downloading github.com/mitchellh/mapstructure v1.1.2
go: downloading github.com/pelletier/go-toml v1.2.0
go: downloading github.com/spf13/cast v1.3.0
go: downloading github.com/spf13/jwalterweatherman v1.0.0
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading gopkg.in/ini.v1 v1.51.0
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/google/go-github/v30 v30.1.0
go: downloading github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
go: downloading github.com/tcnksm/go-gitconfig v0.1.2
go: downloading github.com/ulikunitz/xz v0.5.5
go: downloading golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
go: downloading github.com/labstack/gommon v0.3.1
go: downloading golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
go: downloading golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
go: downloading github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
go: downloading golang.org/x/sys v0.0.0-20211103235746-7861aae1554b
go: downloading github.com/google/go-querystring v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.11
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading github.com/valyala/fasttemplate v1.2.1
go: downloading google.golang.org/appengine v1.6.1
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: downloading github.com/golang/protobuf v1.3.2
go: github.com/mpppk/everest/cmd imports
	github.com/mpppk/everest/embedded: cannot find module providing package github.com/mpppk/everest/embedded
go: github.com/mpppk/everest/cmd imports
	github.com/mpppk/everest/self: cannot find module providing package github.com/mpppk/everest/self

@renovate renovate bot changed the title Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed Oct 23, 2023
@renovate renovate bot closed this Oct 23, 2023
@renovate renovate bot deleted the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch October 23, 2023 10:18
@renovate renovate bot changed the title Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] Oct 23, 2023
@renovate renovate bot reopened this Oct 23, 2023
@renovate renovate bot restored the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch October 23, 2023 16:05
@renovate renovate bot force-pushed the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch from f53130e to 562b3a6 Compare October 23, 2023 16:06
@renovate renovate bot changed the title Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed Jan 9, 2024
@renovate renovate bot closed this Jan 9, 2024
@renovate renovate bot deleted the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch January 9, 2024 13:46
@renovate renovate bot changed the title Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] Jan 9, 2024
@renovate renovate bot reopened this Jan 9, 2024
@renovate renovate bot restored the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch January 9, 2024 16:45
@renovate renovate bot force-pushed the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch from 562b3a6 to 795792c Compare January 9, 2024 16:45
@renovate renovate bot changed the title Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] Update module github.com/labstack/echo/v4 to v4.9.0 [SECURITY] - autoclosed Aug 6, 2024
@renovate renovate bot closed this Aug 6, 2024
@renovate renovate bot deleted the renovate/go-jackfan.us.kg/labstack/echo/v4-vulnerability branch August 6, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants