Browse Source

etcdhttp: Always strip password hash when returning users

Barak Michener 10 years ago
parent
commit
d5a0e3ac6a
1 changed files with 1 additions and 3 deletions
  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)