Skip to content

Commit

Permalink
validate instance url
Browse files Browse the repository at this point in the history
  • Loading branch information
helmus committed Oct 9, 2017
1 parent 08e3315 commit 3a9224c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jira-plugin/options/options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ async function saveOptions() {
if (!hasPathSlash.test(instanceUrl)) {
instanceUrl = instanceUrl + '/';
}
if (instanceUrl.indexOf('://') === -1) {
instanceUrl = 'https://' + instanceUrl;
}
document.getElementById('instanceUrl').value = instanceUrl;
const permissionDomains = domains.concat([instanceUrl]);
const currentInstanceUrl = await storageGet(defaultConfig);
if (!currentInstanceUrl.instanceUrl) {
domains.push(instanceUrl);
}

let granted;
try {
Expand Down

0 comments on commit 3a9224c

Please sign in to comment.