allow JWT parsing on large session policy based tokens (#17167)

This commit is contained in:
Harshavardhana
2023-05-09 00:53:08 -07:00
committed by GitHub
parent 57acacd5a7
commit a7f266c907
6 changed files with 19 additions and 11 deletions

View File

@@ -34,6 +34,7 @@ import (
"time"
"github.com/buger/jsonparser"
"github.com/dustin/go-humanize"
jwtgo "github.com/golang-jwt/jwt/v4"
jsoniter "github.com/json-iterator/go"
)
@@ -53,7 +54,7 @@ var (
SigningMethodHS512 *SigningMethodHMAC
)
const base64BufferSize = 8192
const base64BufferSize = 64 * humanize.KiByte
var (
base64BufPool sync.Pool