Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/matcher.js

Issue 8686043: Make sure that custom filters cannot break our options page (Closed)
Patch Set: Created Oct. 25, 2012, 10:34 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/matcher.js
===================================================================
--- a/lib/matcher.js
+++ b/lib/matcher.js
@@ -6,16 +6,21 @@
//
// This mimicks the API of the Matcher module in ABP/Firefox but users Opera's
// URLFilter API.
//
(function()
{
+ // Make sure that filters don't apply to extension pages. We shouldn't allow
+ // users to break our options page unintentionally, recovering is very hard
+ // if they do.
+ opera.extension.urlfilter.allow.add("widget://*");
+
var WhitelistFilter = null;
var RegExpFilter = null;
var resourceTypes = [
"DOCUMENT", "FONT", "IMAGE", "MEDIA", "OBJECT", "OBJECT_SUBREQUEST",
"OTHER", "SCRIPT", "STYLESHEET", "SUBDOCUMENT", "XMLHTTPREQUEST"
];
require.scopes.matcher =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld