Make sure the context path from the base URI is respected when building TOTP URIs

Closes #21542

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor 2024-01-02 12:59:06 -03:00
parent 60f80ce0c8
commit 986b6af4f5

View file

@ -317,7 +317,7 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
*/ */
private UriBuilder getTotpUriBuilder() { private UriBuilder getTotpUriBuilder() {
return uriInfo.getBaseUriBuilder() return uriInfo.getBaseUriBuilder()
.replacePath(uriInfo.getRequestUri().getPath()) .path(uriInfo.getPath())
.replaceQuery(uriInfo.getRequestUri().getQuery()); .replaceQuery(uriInfo.getRequestUri().getQuery());
} }