Skip to content

Commit 7b44795

Browse files
committed
clean query remove whitespace
1 parent 4eee787 commit 7b44795

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internals/proxy/middlewares/auth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package middlewares
33
import (
44
"encoding/base64"
55
"net/http"
6-
"net/url"
76
"slices"
87
"strings"
98

@@ -89,7 +88,7 @@ func (data AuthMiddleware) Use() http.Handler {
8988
} else if authQuery != "" {
9089
authType = Query
9190

92-
authToken, _ := url.QueryUnescape(authQuery)
91+
authToken := strings.TrimSpace(authQuery)
9392

9493
if isValidToken(tokens, authToken) {
9594
success = true

0 commit comments

Comments
 (0)