Changes

Jump to: navigation, search

Extension Blocklisting:Code Design

910 bytes added, 08:15, 10 June 2008
Blocklist syntax
</emItem>
<emItem id="item_5@domain"/>
<emItem id="item_6@domain" os="WINNT,Darwin"/>
</emItems>
<pluginItems>
<match name="name" exp="some plugin"/>
<match name="description" exp="1[.]2[.]3"/>
<match name="filename" exp=".*\.exe"/> </pluginItem> <pluginItem os="Linux" xpcomabi="x86_64-gcc3"> <!-- All match tags must match a plugin to blocklist a plugin --> <match name="name" exp="some other lugin"/> <match name="description" exp="5[.]6[.]7"/> <match name="filename" exp="npplugin\.dll"/>
</pluginItem>
</pluginItems>
</blocklist></pre>
Examples Explained:
 
* The <tt>item_1@domain</tt> Extension Manager item will be blocklisted if a version between <tt>1.0</tt> and <tt>2.0.*</tt> (e.g. less than <tt>2.1</tt>) is installed and the Firefox (e.g. <tt>id</tt> equal to <tt>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</tt>) version is between <tt>1.5</tt> and <tt>1.5.*</tt> (e.g. less than <tt>1.6</tt>), the Firefox version is between 1.7 and <tt>1.7.*</tt> (e.g. less than <tt>1.8</tt>), or the Toolkit version is between <tt>1.8</tt> and <tt>1.8.*</tt> (e.g. less than <tt>1.9</tt>). Also, the item_1@domain Extension Manager item will be blocklisted if a version between <tt>3.0</tt> and <tt>3.0.*</tt> (e.g. less than <tt>3.1</tt>) is installed and the Firefox (e.g. <tt>id</tt> equal to <tt>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</tt>) version is between <tt>1.5</tt> and <tt>1.5.*</tt> (e.g. less than <tt>1.6</tt>) or the Toolkit version is between <tt>1.8</tt> and <tt>1.8.*</tt> (e.g. less than <tt>1.9</tt>).
 
* The <tt>item_2@domain</tt> Extension Manager item will be blocklisted if a version between <tt>3.1</tt> and <tt>4.*</tt> (e.g. less than <tt>5</tt>) is installed for all versions of the current application.
 
* All version of the item_3@domain Extension Manager item will be blocklisted if the Firefox (e.g. <tt>id</tt> equal to <tt>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</tt>) version is between <tt>1.5</tt> and <tt>1.5.*</tt> (e.g. less than <tt>1.6</tt>).
 
* All versions of the <tt>item_4@domain</tt> Extension Manager item will be blocklisted if the current application version is between <tt>1.5</tt> and <tt>1.5.*</tt> (e.g. less than <tt>1.6</tt>).
 
* All versions of the <tt>item_5@domain</tt> Extension Manager item will be blocklisted for all versions of the current application.
 
* All versions of the <tt>item_6@domain</tt> Extension Manager item will be blocklisted for all versions of the current application, but only on Windows and OSX operating systems. The os attribute is a comma separated list of [http://developer.mozilla.org/en/docs/OS_TARGET operating systems] that the emItem is blocked for.
 
* <tt>pluginItem</tt> is a blocklist entry for plugins, that do not have UUIDs that can be blocklisted. Since they do not have unique identifiers, they must be blocklisted with regular expressions used to pinpoint combinations of <tt>name</tt>, <tt>description</tt>, and <tt>filename</tt>. It makes the entry much simpler but a greedy regexp could spell doom for totally valid plugins so be careful, careful, careful. Keep in mind that pluginItem entries don't have targetApplication ranges so you'll be blocklisting matching plugins for uuid/version combinations as defined in the client URL.
 
* The second <tt>pluginItem</tt> is blocked on Linux with x86_64-gcc3 architecture. Like os, xpcomabi is a comma separated list and matches against the [http://developer.mozilla.org/en/docs/XPCOM_ABI XPCOM ABI] of the application.
As can be seen it is possible to blocklist all version of an extension for all versions of an application as well as any combination of application id's along with version ranges for both the extension id and application id. Also, by not specifying a value and instead using the default value it is possible to lessen the size of the blocklist xml file. This is possible by using the following defaults:
Canmove, confirm
1,567
edits

Navigation menu