Bug 861277 - Uplift addon-sdk's integration branch

This commit is contained in:
Wes Kocher
2013-04-13 17:25:38 -07:00
parent f8c5f44710
commit 3d378e7f12
51 changed files with 1698 additions and 695 deletions

View File

@@ -96,8 +96,15 @@ MatchPattern.prototype = {
return true;
if (this.exactURL && this.exactURL == urlStr)
return true;
// Tests the urlStr against domain and check if
// wildcard submitted (*.domain.com), it only allows
// subdomains (sub.domain.com) or from the root (http://domain.com)
// and reject non-matching domains (otherdomain.com)
// bug 856913
if (this.domain && url.host &&
url.host.slice(-this.domain.length) == this.domain)
(url.host === this.domain ||
url.host.slice(-this.domain.length - 1) === "." + this.domain))
return true;
if (this.urlPrefix && 0 == urlStr.indexOf(this.urlPrefix))
return true;