mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
auth: reject empty user name when checking op permissions
Passing AuthInfo{} to permission checking was causing an infinite loop because it would always return an old revision error. Fixes #7124
This commit is contained in:
parent
5278ea5ed0
commit
c39a59c0be
@ -706,6 +706,11 @@ func (as *authStore) isOpPermitted(userName string, revision uint64, key, rangeE
|
||||
return nil
|
||||
}
|
||||
|
||||
// only gets rev == 0 when passed AuthInfo{}; no user given
|
||||
if revision == 0 {
|
||||
return ErrUserEmpty
|
||||
}
|
||||
|
||||
if revision < as.revision {
|
||||
return ErrAuthOldRevision
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user