Skip to content

Commit cb3f8a0

Browse files
committed
fix: device callback URL needs to handle a /
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.
1 parent 8ab38eb commit cb3f8a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ func (s *Server) parseAuthorizationRequest(r *http.Request) (*storage.AuthReques
491491
return nil, newDisplayedErr(http.StatusBadRequest, "Unregistered redirect_uri (%q).", redirectURI)
492492
}
493493
if redirectURI == deviceCallbackURI && client.Public {
494-
redirectURI = s.issuerURL.Path + deviceCallbackURI
494+
redirectURI = s.absPath(deviceCallbackURI)
495495
}
496496

497497
// From here on out, we want to redirect back to the client with an error.

0 commit comments

Comments
 (0)