mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 23:09:58 +00:00
TUN-9467: bump coredns to solve CVE
* TUN-9467: bump coredns to solve CVE
This commit is contained in:

committed by
João "Pisco" Fernandes

parent
f8d12c9d39
commit
a408612f26
17
vendor/github.com/go-chi/chi/v5/CHANGELOG.md
generated
vendored
17
vendor/github.com/go-chi/chi/v5/CHANGELOG.md
generated
vendored
@@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## v5.0.10 (2023-07-13)
|
||||
|
||||
- Fixed small edge case in tests of v5.0.9 for older Go versions
|
||||
- History of changes: see https://github.com/go-chi/chi/compare/v5.0.8...v5.0.10
|
||||
|
||||
|
||||
## v5.0.9 (2023-07-13)
|
||||
|
||||
- History of changes: see https://github.com/go-chi/chi/compare/v5.0.8...v5.0.9
|
||||
|
||||
|
||||
## v5.0.8 (2022-12-07)
|
||||
|
||||
- History of changes: see https://github.com/go-chi/chi/compare/v5.0.7...v5.0.8
|
||||
@@ -90,14 +101,14 @@ incremental, with the architecture and api being the same today as it was origin
|
||||
makes chi a pretty easy project to maintain, as well thanks to the many amazing community contributions over the years
|
||||
to who all help make chi better (total of 86 contributors to date -- thanks all!).
|
||||
|
||||
Chi has been an labour of love, art and engineering, with the goals to offer beautiful ergonomics, flexibility, performance
|
||||
Chi has been a labour of love, art and engineering, with the goals to offer beautiful ergonomics, flexibility, performance
|
||||
and simplicity when building HTTP services with Go. I've strived to keep the router very minimal in surface area / code size,
|
||||
and always improving the code wherever possible -- and as of today the `chi` package is just 1082 lines of code (not counting
|
||||
middlewares, which are all optional). As well, I don't have the exact metrics, but from my analysis and email exchanges from
|
||||
companies and developers, chi is used by thousands of projects around the world -- thank you all as there is no better form of
|
||||
joy for me than to have art I had started be helpful and enjoyed by others. And of course I use chi in all of my own projects too :)
|
||||
|
||||
For me, the asthetics of chi's code and usage are very important. With the introduction of Go's module support
|
||||
For me, the aesthetics of chi's code and usage are very important. With the introduction of Go's module support
|
||||
(which I'm a big fan of), chi's past versioning scheme choice to v2, v3 and v4 would mean I'd require the import path
|
||||
of "github.com/go-chi/chi/v4", leading to the lengthy discussion at https://github.com/go-chi/chi/issues/462.
|
||||
Haha, to some, you may be scratching your head why I've spent > 1 year stalling to adopt "/vXX" convention in the import
|
||||
@@ -289,7 +300,7 @@ Cheers all, happy coding!
|
||||
|
||||
## v2.0.0-rc1 (2016-07-26)
|
||||
|
||||
- Huge update! chi v2 is a large refactor targetting Go 1.7+. As of Go 1.7, the popular
|
||||
- Huge update! chi v2 is a large refactor targeting Go 1.7+. As of Go 1.7, the popular
|
||||
community `"net/context"` package has been included in the standard library as `"context"` and
|
||||
utilized by `"net/http"` and `http.Request` to managing deadlines, cancelation signals and other
|
||||
request-scoped values. We're very excited about the new context addition and are proud to
|
||||
|
2
vendor/github.com/go-chi/chi/v5/README.md
generated
vendored
2
vendor/github.com/go-chi/chi/v5/README.md
generated
vendored
@@ -1,7 +1,7 @@
|
||||
# <img alt="chi" src="https://cdn.rawgit.com/go-chi/chi/master/_examples/chi.svg" width="220" />
|
||||
|
||||
|
||||
[![GoDoc Widget]][GoDoc] [![Travis Widget]][Travis]
|
||||
[![GoDoc Widget]][GoDoc]
|
||||
|
||||
`chi` is a lightweight, idiomatic and composable router for building Go HTTP services. It's
|
||||
especially good at helping you write large REST API services that are kept maintainable as your
|
||||
|
1
vendor/github.com/go-chi/chi/v5/context.go
generated
vendored
1
vendor/github.com/go-chi/chi/v5/context.go
generated
vendored
@@ -76,6 +76,7 @@ type Context struct {
|
||||
|
||||
// methodNotAllowed hint
|
||||
methodNotAllowed bool
|
||||
methodsAllowed []methodTyp // allowed methods in case of a 405
|
||||
}
|
||||
|
||||
// Reset a routing context to its initial state.
|
||||
|
22
vendor/github.com/go-chi/chi/v5/mux.go
generated
vendored
22
vendor/github.com/go-chi/chi/v5/mux.go
generated
vendored
@@ -156,7 +156,7 @@ func (mx *Mux) Head(pattern string, handlerFn http.HandlerFunc) {
|
||||
mx.handle(mHEAD, pattern, handlerFn)
|
||||
}
|
||||
|
||||
// Options adds the route `pattern` that matches a OPTIONS http method to
|
||||
// Options adds the route `pattern` that matches an OPTIONS http method to
|
||||
// execute the `handlerFn` http.HandlerFunc.
|
||||
func (mx *Mux) Options(pattern string, handlerFn http.HandlerFunc) {
|
||||
mx.handle(mOPTIONS, pattern, handlerFn)
|
||||
@@ -378,11 +378,11 @@ func (mx *Mux) NotFoundHandler() http.HandlerFunc {
|
||||
|
||||
// MethodNotAllowedHandler returns the default Mux 405 responder whenever
|
||||
// a method cannot be resolved for a route.
|
||||
func (mx *Mux) MethodNotAllowedHandler() http.HandlerFunc {
|
||||
func (mx *Mux) MethodNotAllowedHandler(methodsAllowed ...methodTyp) http.HandlerFunc {
|
||||
if mx.methodNotAllowedHandler != nil {
|
||||
return mx.methodNotAllowedHandler
|
||||
}
|
||||
return methodNotAllowedHandler
|
||||
return methodNotAllowedHandler(methodsAllowed...)
|
||||
}
|
||||
|
||||
// handle registers a http.Handler in the routing tree for a particular http method
|
||||
@@ -445,7 +445,7 @@ func (mx *Mux) routeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
if rctx.methodNotAllowed {
|
||||
mx.MethodNotAllowedHandler().ServeHTTP(w, r)
|
||||
mx.MethodNotAllowedHandler(rctx.methodsAllowed...).ServeHTTP(w, r)
|
||||
} else {
|
||||
mx.NotFoundHandler().ServeHTTP(w, r)
|
||||
}
|
||||
@@ -480,8 +480,14 @@ func (mx *Mux) updateRouteHandler() {
|
||||
}
|
||||
|
||||
// methodNotAllowedHandler is a helper function to respond with a 405,
|
||||
// method not allowed.
|
||||
func methodNotAllowedHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(405)
|
||||
w.Write(nil)
|
||||
// method not allowed. It sets the Allow header with the list of allowed
|
||||
// methods for the route.
|
||||
func methodNotAllowedHandler(methodsAllowed ...methodTyp) func(w http.ResponseWriter, r *http.Request) {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
for _, m := range methodsAllowed {
|
||||
w.Header().Add("Allow", reverseMethodMap[m])
|
||||
}
|
||||
w.WriteHeader(405)
|
||||
w.Write(nil)
|
||||
}
|
||||
}
|
||||
|
26
vendor/github.com/go-chi/chi/v5/tree.go
generated
vendored
26
vendor/github.com/go-chi/chi/v5/tree.go
generated
vendored
@@ -43,6 +43,18 @@ var methodMap = map[string]methodTyp{
|
||||
http.MethodTrace: mTRACE,
|
||||
}
|
||||
|
||||
var reverseMethodMap = map[methodTyp]string{
|
||||
mCONNECT: http.MethodConnect,
|
||||
mDELETE: http.MethodDelete,
|
||||
mGET: http.MethodGet,
|
||||
mHEAD: http.MethodHead,
|
||||
mOPTIONS: http.MethodOptions,
|
||||
mPATCH: http.MethodPatch,
|
||||
mPOST: http.MethodPost,
|
||||
mPUT: http.MethodPut,
|
||||
mTRACE: http.MethodTrace,
|
||||
}
|
||||
|
||||
// RegisterMethod adds support for custom HTTP method handlers, available
|
||||
// via Router#Method and Router#MethodFunc
|
||||
func RegisterMethod(method string) {
|
||||
@@ -454,6 +466,13 @@ func (n *node) findRoute(rctx *Context, method methodTyp, path string) *node {
|
||||
return xn
|
||||
}
|
||||
|
||||
for endpoints := range xn.endpoints {
|
||||
if endpoints == mALL || endpoints == mSTUB {
|
||||
continue
|
||||
}
|
||||
rctx.methodsAllowed = append(rctx.methodsAllowed, endpoints)
|
||||
}
|
||||
|
||||
// flag that the routing context found a route, but not a corresponding
|
||||
// supported method
|
||||
rctx.methodNotAllowed = true
|
||||
@@ -493,6 +512,13 @@ func (n *node) findRoute(rctx *Context, method methodTyp, path string) *node {
|
||||
return xn
|
||||
}
|
||||
|
||||
for endpoints := range xn.endpoints {
|
||||
if endpoints == mALL || endpoints == mSTUB {
|
||||
continue
|
||||
}
|
||||
rctx.methodsAllowed = append(rctx.methodsAllowed, endpoints)
|
||||
}
|
||||
|
||||
// flag that the routing context found a route, but not a corresponding
|
||||
// supported method
|
||||
rctx.methodNotAllowed = true
|
||||
|
Reference in New Issue
Block a user