Limit the max number of splitting

Kubernetes-commit: bf516ab99c3c2ce2b4ad6d0acaf122a4d216cc2d
This commit is contained in:
azush26 2020-09-15 23:04:57 +09:00 committed by Kubernetes Publisher
parent 530a2e2c2c
commit c0d57defce
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (a *Authenticator) AuthenticateRequest(req *http.Request) (*authenticator.R
if auth == "" {
return nil, false, nil
}
parts := strings.Split(auth, " ")
parts := strings.SplitN(auth, " ", 3)
if len(parts) < 2 || strings.ToLower(parts[0]) != "bearer" {
return nil, false, nil
}