My cheat sheet for the new INCLUSION types

Discussions about the Application Boundaries Enforcer (ABE) module
PLD
Junior Member
Posts: 30
Joined: Fri May 08, 2015 7:00 am

My cheat sheet for the new INCLUSION types

Post by PLD » Sat Jul 29, 2017 4:19 pm

NoScript 5.0.8.1 has been released. ABE now supports more INCLUSION types! I created a cheat sheet and thought I would share it.

Note: ABE recognizes a number of INCLUSION types. Internally, ABE maps its INCLUSION types to what are known as nsIContentPolicy types. The nsIContentPolicy types (which have names that start with TYPE_) are the content type constants that Firefox and other Gecko browsers use. An ABE INCLUSION type is, in effect, an alias which can match one or more nsIContentPolicy types. The INCLUSION types supported by ABE are now a combination of hard-coded types and types discovered at runtime. This was done to assure backward compatibility.

INCLUSION type: nsIContentPolicy type(s) matched

BEACON: TYPE_BEACON
CSP_REPORT: TYPE_CSP_REPORT
CSS: TYPE_STYLESHEET
DATAREQUEST: TYPE_DATAREQUEST, TYPE_XMLHTTPREQUEST
DOCUMENT: TYPE_DOCUMENT
DTD: TYPE_DTD
FETCH: TYPE_FETCH
FONT: TYPE_FONT
IMAGE: TYPE_IMAGE, TYPE_IMAGESET
IMAGESET: TYPE_IMAGESET
INVALID: TYPE_INVALID
MEDIA: TYPE_MEDIA
OBJ: TYPE_OBJECT, TYPE_OBJECT_SUBREQUEST
OBJECT: TYPE_OBJECT
OBJECT_SUBREQUEST: TYPE_OBJECT_SUBREQUEST
OBJSUB: TYPE_OBJECT_SUBREQUEST
OTHER: TYPE_BEACON, TYPE_CSP_REPORT, TYPE_INVALID, TYPE_OTHER, TYPE_PING, TYPE_REFRESH, TYPE_WEBSOCKET, TYPE_WEB_MANIFEST, TYPE_XBL, TYPE_XSLT
PING: TYPE_PING
REFRESH: TYPE_REFRESH
SCRIPT: TYPE_SCRIPT
STYLESHEET: TYPE_STYLESHEET
SUBDOC: TYPE_SUBDOCUMENT
SUBDOCUMENT: TYPE_SUBDOCUMENT
UNKNOWN: TYPE_OTHER
WEBSOCKET: TYPE_WEBSOCKET
WEB_MANIFEST: TYPE_WEB_MANIFEST
XBL: TYPE_XBL
XHR: TYPE_DATAREQUEST, TYPE_FETCH, TYPE_XMLHTTPREQUEST
XMLHTTPREQUEST: TYPE_DATAREQUEST, TYPE_XMLHTTPREQUEST
XSLT: TYPE_XSLT

nsIContentPolicy type: description

TYPE_BEACON: Indicates a beacon post.
TYPE_CSP_REPORT: Indicates a Content Security Policy report.
TYPE_DATAREQUEST: Alias for TYPE_XMLHTTPREQUEST
TYPE_DOCUMENT: Indicates a document at the top-level (i.e., in a browser).
TYPE_DTD: Indicates a DTD loaded by an XML document.
TYPE_FETCH: Indicates a load initiated by the fetch() function from the Fetch specification.
TYPE_FONT: Indicates a font loaded via @font-face rule.
TYPE_IMAGE: Indicates an image (for example, <img> elements).
TYPE_IMAGESET: Indicates a <img srcset> or <picture> request.
TYPE_INVALID: Indicates a unset or bogus policy type.
TYPE_MEDIA: Indicates a video or audio load.
TYPE_OBJECT: Indicates a generic object (plugin-handled content typically falls under this category).
TYPE_OBJECT_SUBREQUEST: Indicates a request by a plugin.
TYPE_OTHER: Indicates content whose type is unknown, or is not interesting outside a limited use case.
TYPE_PING: Indicates a ping triggered by a click on <a ping="..."> element.
TYPE_REFRESH: Indicates a timed refresh.
TYPE_SCRIPT: Indicates an executable script (such as JavaScript)
TYPE_STYLESHEET: Indicates a stylesheet (for example, <style> elements).
TYPE_SUBDOCUMENT: Indicates a document contained within another document (for example, <iframe> and <frame> elements).
TYPE_WEBSOCKET: Indicates a WebSocket load.
TYPE_WEB_MANIFEST: Indicates a web manifest.
TYPE_XBL: Indicates an XBL binding request, triggered either by -moz-binding CSS property or the Document.addBinding() method.
TYPE_XMLHTTPREQUEST: Indicates an XMLHttpRequest. Also used for document.load.
TYPE_XSLT: Indicates a style sheet transformation.

References

https://noscript.net/abe/
viewforum.php?f=23
https://developer.mozilla.org/en-US/doc ... tentPolicy
https://dxr.mozilla.org/mozilla-release ... cyBase.idl
-

barbaz
Senior Member
Posts: 8873
Joined: Sat Aug 03, 2013 5:45 pm

Re: My cheat sheet for the new INCLUSION types

Post by barbaz » Sun Jul 30, 2017 12:22 am

Nice! 8-)

@Giorgio: Should this thread be sticky?
*Always* check the changelogs BEFORE updating that important software!
-

Post Reply