Skip to content

Commit

Permalink
🐛 When query parameter is disabled no redirect
Browse files Browse the repository at this point in the history
When configuring the Authorization block and add the query parameter disabled, redirections stop working as expected
  • Loading branch information
Daniel Branco authored and greenpau committed May 10, 2022
1 parent 345e3d3 commit 46f5299
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/cla/consent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
email: [email protected]
- name: Pedro Flores
email: [email protected]
- name: Daniel Branco
email: [email protected]
5 changes: 3 additions & 2 deletions pkg/authz/handlers/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func configureRedirect(w http.ResponseWriter, r *http.Request, rr *requests.Auth
return
}

rr.Redirect.Enabled = true

if rr.Redirect.QueryDisabled {
return
}
Expand All @@ -115,8 +117,7 @@ func configureRedirect(w http.ResponseWriter, r *http.Request, rr *requests.Auth
} else {
rr.Redirect.URL = r.RequestURI
}

rr.Redirect.Enabled = true

rr.Redirect.Separator = "?"

if strings.Contains(rr.Redirect.AuthURL, "?") {
Expand Down

0 comments on commit 46f5299

Please sign in to comment.