Skip to content

Commit bf516ab

Browse files
author
azush26
committed
Limit the max number of splitting
1 parent f64f687 commit bf516ab

File tree

1 file changed

+1
-1
lines changed
  • staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken

1 file changed

+1
-1
lines changed

staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (a *Authenticator) AuthenticateRequest(req *http.Request) (*authenticator.R
3939
if auth == "" {
4040
return nil, false, nil
4141
}
42-
parts := strings.Split(auth, " ")
42+
parts := strings.SplitN(auth, " ", 3)
4343
if len(parts) < 2 || strings.ToLower(parts[0]) != "bearer" {
4444
return nil, false, nil
4545
}

0 commit comments

Comments
 (0)