diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 98e20a43..5cca0950 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/context/context.go b/context/context.go index 626a89b6..69e30f79 100644 --- a/context/context.go +++ b/context/context.go @@ -4178,11 +4178,11 @@ var WriteJSON = func(ctx *Context, v interface{}, options *JSON) error { // See https://golang.org/src/strings/builder.go#L45 // func bytesToString(b []byte) string { -// return *(*string)(unsafe.Pointer(&b)) +// return unsafe.String(unsafe.SliceData(b), len(b)) // } func stringToBytes(s string) []byte { - return *(*[]byte)(unsafe.Pointer(&s)) + return unsafe.Slice(unsafe.StringData(s), len(s)) } type ( diff --git a/go.mod b/go.mod index d386d07a..7115448a 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/kataras/blocks v0.0.7 github.com/kataras/golog v0.1.9 - github.com/kataras/jwt v0.1.8 + github.com/kataras/jwt v0.1.9 github.com/kataras/neffos v0.0.22 github.com/kataras/pio v0.0.12 github.com/kataras/sitemap v0.0.6 diff --git a/go.sum b/go.sum index 42434f85..f75c5d9b 100644 --- a/go.sum +++ b/go.sum @@ -108,8 +108,8 @@ github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= -github.com/kataras/jwt v0.1.8 h1:u71baOsYD22HWeSOg32tCHbczPjdCk7V4MMeJqTtmGk= -github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/jwt v0.1.9 h1:DmmemKA/qMNGGHJ6PrLv059DvOeA71ch5ESNc0ueqVk= +github.com/kataras/jwt v0.1.9/go.mod h1:Kw6GZv2JQN8K4D3NGaSc/qZzTYfaRdyaC2zWi+RBRIQ= github.com/kataras/neffos v0.0.22 h1:3M4lHrUl//2OKmS9t9z3AKIZqwha6ABeA6WoF03HEv8= github.com/kataras/neffos v0.0.22/go.mod h1:IIJZcUDvwBxJGlDj942dqQgyznVKYDti91f8Ez+RRxE= github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w=