mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 10:26:29 +02:00
proxy: fix group impersonation bug
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
b373634012
commit
decf661eb0
2 changed files with 8 additions and 1 deletions
|
@ -23,6 +23,10 @@
|
|||
|
||||
- Removed `AUTHENTICATE_INTERNAL_URL`/`authenticate_internal_url` which is no longer used.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed a bug where the impersonate form would persist an empty string for groups value if none set.[GH-303](https://github.com/pomerium/pomerium/issues/303)
|
||||
|
||||
## v0.3.0
|
||||
|
||||
### New
|
||||
|
|
|
@ -233,7 +233,10 @@ func (p *Proxy) Impersonate(w http.ResponseWriter, r *http.Request) {
|
|||
// OK to impersonation
|
||||
session.ImpersonateEmail = r.FormValue("email")
|
||||
session.ImpersonateGroups = strings.Split(r.FormValue("group"), ",")
|
||||
|
||||
groups := r.FormValue("group")
|
||||
if groups != "" {
|
||||
session.ImpersonateGroups = strings.Split(groups, ",")
|
||||
}
|
||||
if err := p.sessionStore.SaveSession(w, r, session); err != nil {
|
||||
httputil.ErrorResponse(w, r, err)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue