Limit the max number of splitting
Kubernetes-commit: bf516ab99c3c2ce2b4ad6d0acaf122a4d216cc2d
This commit is contained in:
parent
530a2e2c2c
commit
c0d57defce
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue