Merge pull request #758 from stianst/master
KEYCLOAK-746 Allow linking to account from external provider
This commit is contained in:
commit
6855b2f0e4
1 changed files with 6 additions and 3 deletions
|
@ -70,6 +70,7 @@ import org.keycloak.util.UriUtils;
|
|||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.HttpMethod;
|
||||
import javax.ws.rs.OPTIONS;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
|
@ -181,9 +182,11 @@ public class AccountService {
|
|||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
String referrer = headers.getRequestHeaders().getFirst("Referer");
|
||||
if (referrer != null && !requestOrigin.equals(UriUtils.getOrigin(referrer))) {
|
||||
throw new ForbiddenException();
|
||||
if (!request.getHttpMethod().equals("GET")) {
|
||||
String referrer = headers.getRequestHeaders().getFirst("Referer");
|
||||
if (referrer != null && !requestOrigin.equals(UriUtils.getOrigin(referrer))) {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue