Bug 1343996: Forbid empty types and urls request filter arrays. r=rpl
authorKris Maglione <maglione.k@gmail.com>
Thu, 02 Mar 2017 12:51:44 -0800
changeset 493362 f58322b063085e28748b2a3f22be331e73404d3a
parent 493361 fdf4387356577e0c5732b1120d62163393107db9
child 493363 f67c47f25e6c8056bf22199d6d0596377526b7fa
push id47743
push userbzbarsky@mozilla.com
push dateFri, 03 Mar 2017 21:15:16 +0000
reviewersrpl
bugs1343996
milestone54.0a1
Bug 1343996: Forbid empty types and urls request filter arrays. r=rpl MozReview-Commit-ID: IsMwRYVo9t9
toolkit/components/extensions/schemas/web_request.json
--- a/toolkit/components/extensions/schemas/web_request.json
+++ b/toolkit/components/extensions/schemas/web_request.json
@@ -97,23 +97,25 @@
       {
         "id": "RequestFilter",
         "type": "object",
         "description": "An object describing filters to apply to webRequest events.",
         "properties": {
           "urls": {
             "type": "array",
             "description": "A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out.",
-            "items": { "type": "string" }
+            "items": { "type": "string" },
+            "minItems": 1
           },
           "types": {
             "type": "array",
             "optional": true,
             "description": "A list of request types. Requests that cannot match any of the types will be filtered out.",
-            "items": { "$ref": "ResourceType" }
+            "items": { "$ref": "ResourceType" },
+            "minItems": 1
           },
           "tabId": { "type": "integer", "optional": true },
           "windowId": { "type": "integer", "optional": true }
         }
       },
       {
         "id": "HttpHeaders",
         "type": "array",