KEYCLOAK-10665 Fix incorrect client link on my resources page

This commit is contained in:
k-tamura 2019-07-10 12:50:20 +09:00 committed by Pedro Igor
parent 2dceda3f50
commit fe0d6f4583

View file

@ -971,7 +971,7 @@ public class AccountFormService extends AbstractSecuredLocalService {
if (referrerUri != null) {
referrerUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), referrerUri, realm, referrerClient);
} else {
referrerUri = ResolveRelative.resolveRelativeUri(session.getContext().getUri().getRequestUri(), client.getRootUrl(), referrerClient.getBaseUrl());
referrerUri = ResolveRelative.resolveRelativeUri(session.getContext().getUri().getRequestUri(), referrerClient.getRootUrl(), referrerClient.getBaseUrl());
}
if (referrerUri != null) {
@ -982,9 +982,8 @@ public class AccountFormService extends AbstractSecuredLocalService {
return new String[]{referrerName, referrerUri};
}
} else if (referrerUri != null) {
referrerClient = realm.getClientByClientId(referrer);
if (client != null) {
referrerUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), referrerUri, realm, referrerClient);
referrerUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), referrerUri, realm, client);
if (referrerUri != null) {
return new String[]{referrer, referrerUri};