Skip to content

Commit

Permalink
Host param fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Melnikov committed Jun 8, 2017
1 parent a5cc31c commit d1ab25f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func (p *OAuthProxy) OAuthCallback(rw http.ResponseWriter, req *http.Request) {
}

// set cookie, or deny
if p.Validator(session.Email) && p.provider.ValidateGroup(session.Email) && p.provider.ValidateGroupByHost(req.Host, session.Groups) {
if p.Validator(session.Email) && p.provider.ValidateGroup(session.Email) && p.provider.ValidateGroupByHost(strings.Split(req.Host, ":")[0], session.Groups) {
log.Printf("%s authentication complete %s", remoteAddr, session)
err := p.SaveSession(rw, req, session)
if err != nil {
Expand Down

0 comments on commit d1ab25f

Please sign in to comment.