Fix missing early returns on routes

pull/691/head
Erik Wilson 2019-07-30 15:44:34 -07:00
parent 4a65764c3b
commit fdb997b4ee
1 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,7 @@ func servingKubeletCert(server *config.Control) http.Handler {
nodeName, nodePassword, err := getNodeInfo(req)
if err != nil {
sendError(err, resp)
return
}
if err := ensureNodePassword(server.Runtime.NodePasswdFile, nodeName, nodePassword); err != nil {
@ -170,6 +171,7 @@ func clientKubeletCert(server *config.Control) http.Handler {
nodeName, nodePassword, err := getNodeInfo(req)
if err != nil {
sendError(err, resp)
return
}
if err := ensureNodePassword(server.Runtime.NodePasswdFile, nodeName, nodePassword); err != nil {