|
@@ -61,6 +61,9 @@ public class JiraAccount {
|
|
|
String url = getSetting(name, settings, SECURE_URL_SETTING);
|
|
|
try {
|
|
|
URI uri = new URI(url);
|
|
|
+ if (uri.getScheme() == null) {
|
|
|
+ throw new URISyntaxException("null", "No scheme defined in url");
|
|
|
+ }
|
|
|
Scheme protocol = Scheme.parse(uri.getScheme());
|
|
|
if ((protocol == Scheme.HTTP) && (Booleans.isTrue(settings.get(ALLOW_HTTP_SETTING)) == false)) {
|
|
|
throw new SettingsException("invalid jira [" + name + "] account settings. unsecure scheme [" + protocol + "]");
|
|
@@ -68,7 +71,7 @@ public class JiraAccount {
|
|
|
this.url = uri;
|
|
|
} catch (URISyntaxException | IllegalArgumentException e) {
|
|
|
throw new SettingsException(
|
|
|
- "invalid jira [" + name + "] account settings. invalid [" + SECURE_URL_SETTING.getKey() + "] setting", e);
|
|
|
+ "invalid jira [" + name + "] account settings. invalid [" + SECURE_URL_SETTING.getKey() + "] setting", e);
|
|
|
}
|
|
|
this.user = getSetting(name, settings, SECURE_USER_SETTING);
|
|
|
this.password = getSetting(name, settings, SECURE_PASSWORD_SETTING);
|