Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CFID-270: fix regex bug that prevented https URL from being registere…

…d for existing vmc

Change-Id: I75ff9cd214d45e08156936c49230b41c60c2bd8d
  • Loading branch information...
commit b71ea3926366ed3e6ce307b6c3cb1bb1741d6c34 1 parent f3241fd
@dsyer dsyer authored
View
2  common/src/main/java/org/cloudfoundry/identity/uaa/oauth/ClientAdminBootstrap.java
@@ -129,7 +129,7 @@ private void addHttpsCallbacks() {
}
Set<String> uris = new HashSet<String>(registeredRedirectUri);
for (String uri : registeredRedirectUri) {
- if (uri.matches("^http://[^/]*\\." + domain)) {
+ if (uri.matches("^http://[^/]*\\." + domain + ".*")) {
uris.add("https" + uri.substring("http".length()));
}
}
View
2  common/src/test/java/org/cloudfoundry/identity/uaa/oauth/ClientAdminBootstrapTests.java
@@ -90,7 +90,7 @@ public void testLegacySkippedController() throws Exception {
@Test
public void testLegacyHttpsAdded() throws Exception {
bootstrap.setDomain("bar.com");
- BaseClientDetails input = new BaseClientDetails("foo", "password,scim,tokens", "read,write,password", "client_credentials", "ROLE_CLIENT,ROLE_ADMIN", "http://foo.bar.com");
+ BaseClientDetails input = new BaseClientDetails("foo", "password,scim,tokens", "read,write,password", "client_credentials", "ROLE_CLIENT,ROLE_ADMIN", "http://foo.bar.com/spam");
bootstrap.setClientRegistrationService(clientRegistrationService);
Mockito.when(clientRegistrationService.listClientDetails()).thenReturn(Arrays.<ClientDetails>asList(input));
bootstrap.afterPropertiesSet();
Please sign in to comment.
Something went wrong with that request. Please try again.