大家好,Go 官方发布了 Go1.19.1 和 Go1.18.6,这是两个小版本,主要包括安全更新和一些 bug 修复,这次一共修复了 20 个 issue。
首先是两个安全更新:
net/http 包:handle server errors after sending GOAWAY
A closing HTTP/2 server connection could hang forever waiting for a clean shutdown that was preempted by a subsequent fatal error. This failure mode could be exploited to cause a denial of service.
net/url 包:JoinPath does not strip relative path components in all circumstances
JoinPath and URL.JoinPath would not remove ../ path components appended to a relative path. For example, JoinPath("https://go.dev", "../go") returned the URL https://go.dev/../go, despite the JoinPath documentation stating that ../ path elements are cleaned from the result.
其他的 issue 列表见:https://github.com/golang/go/issues?q=milestone%3AGo1.19.1+label%3ACherryPickApproved,文末点击「阅读原文」可以直达该页面。
Go语言中文网为大家准备好了最新的安装包:https://studygolang.com/dl。
推荐阅读