reverted over-reaching check on webfinger fetcher

pull/820/merge
Justin Richer 2015-06-26 17:17:38 -04:00
parent cd47d32e2d
commit 667c766273
1 changed files with 6 additions and 8 deletions

View File

@ -208,14 +208,12 @@ public class WebfingerIssuerService implements IssuerService {
// preserving http scheme is strictly for demo system use only. // preserving http scheme is strictly for demo system use only.
String scheme = key.getScheme(); String scheme = key.getScheme();
if (!Strings.isNullOrEmpty(scheme)) { if (!Strings.isNullOrEmpty(scheme) &&scheme.equals("http")) {
if (scheme.equals("http")) { if (forceHttps) {
if (forceHttps) { throw new IllegalArgumentException("Scheme must start with htps");
throw new IllegalArgumentException("Scheme must start with htps"); } else {
} else { logger.warn("Webfinger endpoint MUST use the https URI scheme, overriding by configuration");
logger.warn("Webfinger endpoint MUST use the https URI scheme, overriding by configuration"); scheme = "http://"; // add on colon and slashes.
scheme = "http://"; // add on colon and slashes.
}
} }
} else { } else {
scheme = "https://"; scheme = "https://";