mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
security: fix var shadowing in CreateOrUpdateUser
This commit is contained in:
@@ -115,7 +115,7 @@ func (s *Store) GetUser(name string) (User, error) {
|
||||
}
|
||||
|
||||
func (s *Store) CreateOrUpdateUser(user User) (User, error) {
|
||||
user, err := s.GetUser(user.User)
|
||||
_, err := s.GetUser(user.User)
|
||||
if err == nil {
|
||||
// Remove the update-user roles from updating downstream.
|
||||
// Roles are granted or revoked, not changed directly.
|
||||
|
||||
Reference in New Issue
Block a user