Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 0cc3e5f

Browse files
committed
Merge pull request #3019 from WebsiteDeveloper/Issue-3013
Changed to check for case insensitive http: and https:
2 parents 801aafc + b93f1cd commit 0cc3e5f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/preferences/PreferencesDialogs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ define(function (require, exports, module) {
5656
var obj = PathUtils.parseUrl(url);
5757
if (!obj) {
5858
result = Strings.BASEURL_ERROR_UNKOWN_ERROR;
59-
} else if (obj.protocol !== "http:" && obj.protocol !== "https:") {
60-
result = StringUtils.format(Strings.BASEURL_ERROR_INVALID_PROTOCOL, obj.protocol);
59+
} else if (obj.href.search(/^(http|https):\/\//i) !== 0) {
60+
result = StringUtils.format(Strings.BASEURL_ERROR_INVALID_PROTOCOL, obj.href.substring(0, obj.href.indexOf("//")));
6161
} else if (obj.search !== "") {
6262
result = StringUtils.format(Strings.BASEURL_ERROR_SEARCH_DISALLOWED, obj.search);
6363
} else if (obj.hash !== "") {

0 commit comments

Comments
 (0)