Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/src/github.com/aliyun/…
Browse files Browse the repository at this point in the history
…alibaba-cloud-sdk-go-1.62.680
  • Loading branch information
Shengwen YU authored Feb 23, 2024
2 parents a010528 + 54819ba commit dd89a19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

8 changes: 7 additions & 1 deletion src/core/controllers/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ func (oc *OIDCController) RedirectLogin() {
oc.SendInternalServerError(err)
return
}
if err := oc.SetSession(redirectURLKey, oc.Ctx.Request.URL.Query().Get("redirect_url")); err != nil {
redirectURL := oc.Ctx.Request.URL.Query().Get("redirect_url")
if strings.HasPrefix(redirectURL, "//") {
log.Errorf("invalid redirect url: %v", redirectURL)
oc.SendBadRequestError(fmt.Errorf("cannot redirect to other site"))
return
}
if err := oc.SetSession(redirectURLKey, redirectURL); err != nil {
log.Errorf("failed to set session for key: %s, error: %v", redirectURLKey, err)
oc.SendInternalServerError(err)
return
Expand Down

0 comments on commit dd89a19

Please sign in to comment.