| | |
| | | logger.debug("No Redirect URIs supplied"); |
| | | redirectUri = null; |
| | | } else { |
| | | redirectUri = lowerCaseHostname(redirectUri); |
| | | |
| | | String r = redirectUri.indexOf('?') != -1 ? redirectUri.substring(0, redirectUri.indexOf('?')) : redirectUri; |
| | | Set<String> resolveValidRedirects = resolveValidRedirects(uriInfo, rootUrl, validRedirects); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private static String lowerCaseHostname(String redirectUri) { |
| | | int n = redirectUri.indexOf('/', 7); |
| | | if (n == -1) { |
| | | return redirectUri.toLowerCase(); |
| | | } else { |
| | | return redirectUri.substring(0, n).toLowerCase() + redirectUri.substring(n); |
| | | } |
| | | } |
| | | |
| | | private static String relativeToAbsoluteURI(UriInfo uriInfo, String rootUrl, String relative) { |
| | | if (rootUrl == null) { |
| | | URI baseUri = uriInfo.getBaseUri(); |