Index: lib/filterClasses.js |
=================================================================== |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -826,6 +826,17 @@ |
} |
} |
+ // For security reasons, never match $rewrite filters |
+ // against requests that might load any code to be executed. |
+ if (rewrite != null) |
+ { |
+ if (contentType == null) |
+ ({contentType} = RegExpFilter.prototype); |
+ contentType &= ~(RegExpFilter.typeMap.SCRIPT | |
+ RegExpFilter.typeMap.SUBDOCUMENT | |
+ RegExpFilter.typeMap.OBJECT); |
+ } |
+ |
try |
{ |
if (blocking) |