瀏覽代碼

Merge pull request #3033 from barakmich/strip_pass

etcdhttp: Always strip password hash when returning users
Xiang Li 11 年之前
父節點
當前提交
ad7124599d
共有 1 個文件被更改,包括 1 次插入3 次删除
  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)