diff --git a/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java b/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java index 5fb64e32e9..fb833c14b1 100644 --- a/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java +++ b/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java @@ -101,7 +101,7 @@ public class AppConfiguration implements Configuration { private Boolean requestUriParameterSupported; private Boolean requestUriHashVerificationEnabled; private Boolean requireRequestUriRegistration; - private List requestUriBlackList; + private List requestUriBlockList; private String opPolicyUri; private String opTosUri; private int authorizationCodeLifetime; @@ -2090,13 +2090,13 @@ public void setCibaEnabled(Boolean cibaEnabled) { this.cibaEnabled = cibaEnabled; } - public List getRequestUriBlackList() { - if (requestUriBlackList == null) requestUriBlackList = Lists.newArrayList(); - return requestUriBlackList; + public List getRequestUriBlockList() { + if (requestUriBlockList == null) requestUriBlockList = Lists.newArrayList(); + return requestUriBlockList; } - public void setRequestUriBlackList(List requestUriBlackList) { - this.requestUriBlackList = requestUriBlackList; + public void setRequestUriBlockList(List requestUriBlockList) { + this.requestUriBlockList = requestUriBlockList; } public Boolean getRequestUriHashVerificationEnabled() { diff --git a/Server/src/main/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequest.java b/Server/src/main/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequest.java index a9cabcdbf7..72773d939d 100644 --- a/Server/src/main/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequest.java +++ b/Server/src/main/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequest.java @@ -502,7 +502,7 @@ public static void validateRequestUri(String requestUri, Client client, AppConfi } // check black list - final List blackList = appConfiguration.getRequestUriBlackList(); + final List blackList = appConfiguration.getRequestUriBlockList(); if (!blackList.isEmpty()) { URLPatternList urlPatternList = new URLPatternList(blackList); if (urlPatternList.isUrlListed(requestUri)) { diff --git a/Server/src/test/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequestTest.java b/Server/src/test/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequestTest.java index 82bb49e0b4..4d78875816 100644 --- a/Server/src/test/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequestTest.java +++ b/Server/src/test/java/org/gluu/oxauth/model/authorize/JwtAuthorizationRequestTest.java @@ -44,7 +44,7 @@ public void validateRequestUri_whichIsBlackListed_shouldRaiseException() { String requestUri = "https://myrp.com/request_uri"; final AppConfiguration appConfiguration = new AppConfiguration(); - appConfiguration.setRequestUriBlackList(Arrays.asList("myrp.com", "evil.com")); + appConfiguration.setRequestUriBlockList(Arrays.asList("myrp.com", "evil.com")); JwtAuthorizationRequest.validateRequestUri(requestUri, new Client(), appConfiguration, "", new ErrorResponseFactory()); } @@ -53,7 +53,7 @@ public void validateRequestUri_forLocalhost_shouldRaiseException() { String requestUri = "https://localhost/request_uri"; final AppConfiguration appConfiguration = new AppConfiguration(); - appConfiguration.setRequestUriBlackList(Collections.singletonList("localhost")); + appConfiguration.setRequestUriBlockList(Collections.singletonList("localhost")); JwtAuthorizationRequest.validateRequestUri(requestUri, new Client(), appConfiguration, "", new ErrorResponseFactory()); } @@ -62,7 +62,7 @@ public void validateRequestUri_forLocalhostIp_shouldRaiseException() { String requestUri = "https://127.0.0.1/request_uri"; final AppConfiguration appConfiguration = new AppConfiguration(); - appConfiguration.setRequestUriBlackList(Collections.singletonList("127.0.0.1")); + appConfiguration.setRequestUriBlockList(Collections.singletonList("127.0.0.1")); JwtAuthorizationRequest.validateRequestUri(requestUri, new Client(), appConfiguration, "", new ErrorResponseFactory()); } @@ -71,7 +71,7 @@ public void validateRequestUri_whichIsNotBlackListed_shouldBeOk() { String requestUri = "https://myrp.com/request_uri"; final AppConfiguration appConfiguration = new AppConfiguration(); - appConfiguration.setRequestUriBlackList(Arrays.asList("evil.com", "second.com")); + appConfiguration.setRequestUriBlockList(Arrays.asList("evil.com", "second.com")); JwtAuthorizationRequest.validateRequestUri(requestUri, new Client(), appConfiguration, "", new ErrorResponseFactory()); } }