mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 01:09:56 +00:00
Revert "CC-796: Remove dependency on unsupported version of go-oidc"
This reverts commit 0899d6a136
.
This commit is contained in:
14
vendor/gopkg.in/square/go-jose.v2/encoding.go
generated
vendored
14
vendor/gopkg.in/square/go-jose.v2/encoding.go
generated
vendored
@@ -23,12 +23,13 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"math/big"
|
||||
"strings"
|
||||
"unicode"
|
||||
"regexp"
|
||||
|
||||
"gopkg.in/square/go-jose.v2/json"
|
||||
)
|
||||
|
||||
var stripWhitespaceRegex = regexp.MustCompile("\\s")
|
||||
|
||||
// Helper function to serialize known-good objects.
|
||||
// Precondition: value is not a nil pointer.
|
||||
func mustSerializeJSON(value interface{}) []byte {
|
||||
@@ -55,14 +56,7 @@ func mustSerializeJSON(value interface{}) []byte {
|
||||
|
||||
// Strip all newlines and whitespace
|
||||
func stripWhitespace(data string) string {
|
||||
buf := strings.Builder{}
|
||||
buf.Grow(len(data))
|
||||
for _, r := range data {
|
||||
if !unicode.IsSpace(r) {
|
||||
buf.WriteRune(r)
|
||||
}
|
||||
}
|
||||
return buf.String()
|
||||
return stripWhitespaceRegex.ReplaceAllString(data, "")
|
||||
}
|
||||
|
||||
// Perform compression based on algorithm
|
||||
|
Reference in New Issue
Block a user