Bug 1343996: Forbid empty types and urls request filter arrays. r?rpl draft
authorKris Maglione <maglione.k@gmail.com>
Thu, 02 Mar 2017 12:51:44 -0800
changeset 492134 38ea25db7d0e57fafa86ce3f090fa8a805945ebf
parent 492117 f24dc887296771ed1d36f96caaed0e326c6f3d25
child 547659 692645b08a778576a5bdd83d0a3c4d5de222717e
push id47539
push usermaglione.k@gmail.com
push dateThu, 02 Mar 2017 20:52: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",