Explorar o código

etcdhttp: Always strip password hash when returning users

Barak Michener %!s(int64=11) %!d(string=hai) anos
pai
achega
d5a0e3ac6a
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      etcdserver/etcdhttp/client_auth.go

+ 1 - 3
etcdserver/etcdhttp/client_auth.go

@@ -323,9 +323,7 @@ func (sh *authHandler) forUser(w http.ResponseWriter, r *http.Request, user stri
 			writeError(w, err)
 			return
 		}
-		if u.Password == "" {
-			newuser.Password = ""
-		}
+		newuser.Password = ""
 
 		if created {
 			w.WriteHeader(http.StatusCreated)