Browse Source

fix: device callback URL needs to handle a / (#4448)

If the issuer path ends with a / the URL will be built wrong so we
should instead use the helper function to ensure the path is built
correctly. fixes #4242.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
pull/4454/head^2
Doug Goldstein 2 months ago committed by GitHub
parent
commit
dcbb7bbe58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      server/oauth2.go

2
server/oauth2.go

@ -491,7 +491,7 @@ func (s *Server) parseAuthorizationRequest(r *http.Request) (*storage.AuthReques
return nil, newDisplayedErr(http.StatusBadRequest, "Unregistered redirect_uri (%q).", redirectURI)
}
if redirectURI == deviceCallbackURI && client.Public {
redirectURI = s.issuerURL.Path + deviceCallbackURI
redirectURI = s.absPath(deviceCallbackURI)
}
// From here on out, we want to redirect back to the client with an error.

Loading…
Cancel
Save