Echo v4.2.0 Release Notes

Release Date: 2020-02-11 // about 4 years ago
  • 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