From cb3316db45e369ba31d97c5ee2dcd9c353a3cb5d Mon Sep 17 00:00:00 2001
From: Anjana
When writing filters to validate user input, it is imperative that filters always be - whitelist-based, allowing known-safe constructs and disallowing all other input. Blacklist-based + safelist-based, allowing known-safe constructs and disallowing all other input. Blocklist-based filters that disallow known-bad inputs and allow everything else are not secure, as not everything that is bad is yet known (for example, because it might be invented in the future).
@@ -1244,17 +1244,17 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute dThere are many constructs that can be used to try to trick a site into executing code. Here - are some that authors are encouraged to consider when writing whitelist filters:
+ are some that authors are encouraged to consider when writing safelist filters:img
, it is important to whitelist
+ img
, it is important to safelist
any provided attributes as well. If one allowed all attributes then an attacker could, for
instance, use the onload
attribute to run arbitrary
script.javascript:
", but user agents can
implement (and indeed, have historically implemented) others.User agents should filter potentially active (scripted) content (e.g. HTML) when it is dragged - and when it is dropped, using a whitelist of known-safe features. Similarly, relative URLs should be turned into absolute URLs to avoid references changing in unexpected ways. This specification does not specify how this is performed.
@@ -81933,8 +81933,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O its URL matches the fallback namespace of one or more relevant application caches, and the most appropriate application cache of those - that match does not have an entry in its online - whitelist that has the same origin as the resource's URL and that is a + that match does not have an entry in its online + safelist that has the same origin as the resource's URL and that is a prefix match for the resource's URL, and the user didn't cancel the navigation attempt during the earlier step, and the navigation attempt failed (e.g. the server returned a 4xx or 5xx status, or there was a DNS error), then: or a valid URL identifying a resource + concept-appcache-onlinesafelist-wildcard --> or a valid URL identifying a resource other than the manifest itself, and then zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION (tab) characters. @@ -84034,15 +84034,15 @@ NETWORK: than once.Namespaces that the user agent is to put into the online whitelist must all be specified in online whitelist sections. (This is needed for + data-x="concept-appcache-onlinesafelist">online safelist must all be specified in online safelist sections. (This is needed for any URL that the page is intending to use to communicate back to the server.) To specify that all - URLs are automatically whitelisted in this way, a U+002A ASTERISK character (*) may be specified - as one of the URLs.
+ URLs are automatically safelisted in this way, a U+002A ASTERISK character (*) may be specified + as one of the URLs.Authors should not include namespaces in the online whitelist for which another namespace in - the online whitelist is a prefix + data-x="concept-appcache-onlinesafelist">online safelist for which another namespace in + the online safelist is a prefix match.
Relative URLs must be given relative to the manifest's own @@ -84054,7 +84054,7 @@ NETWORK: isn't allowed in URLs in manifests).
Fallback namespaces and namespaces in the - online whitelist are matched by prefix + online safelist are matched by prefix match.
@@ -84102,12 +84102,12 @@ NETWORK: URL">absolute URLs for fallback entries. -Let online whitelist namespaces be an initially empty list of Let online safelist namespaces be an initially empty list of absolute URLs for an online whitelist.
Let online whitelist wildcard flag be blocking.
Let online safelist wildcard flag be blocking.
Let cache mode flag be fast.
If line equals "NETWORK:" (the word "NETWORK" followed by a U+003A - COLON character (:)), then set mode to "online whitelist" and jump back to + COLON character (:)), then set mode to "online safelist" and jump back to the step labeled start of line.
If line equals "SETTINGS:" (the word "SETTINGS" followed by a U+003A @@ -84271,12 +84271,12 @@ NETWORK: -
If the first item in tokens is a U+002A ASTERISK character (*), then - set online whitelist wildcard flag to open and jump back + set online safelist wildcard flag to open and jump back to the step labeled start of line.
Otherwise, resolve the first item in tokens, relative to base URL, with the URL character @@ -84292,7 +84292,7 @@ NETWORK: data-x="concept-url-serialiser">URL serialiser algorithm to the resulting parsed URL, with the exclude fragment flag set.
-Add new URL to the online whitelist namespaces.
+Add new URL to the online safelist namespaces.
Return the explicit URLs list, the fallback URLs - mapping, the online whitelist namespaces, the online whitelist + mapping, the online safelist namespaces, the online safelist wildcard flag, and the cache mode flag.
The resource that declares the manifest (with the manifest
attribute) will always get taken from the cache,
whether it is listed in the cache or not, even if it is listed in an online whitelist namespace.
If a resource is listed in the explicit section or as a fallback entry in the fallback section, the resource will always be taken from the cache, regardless of any other matching entries in the fallback namespaces or online whitelist namespaces.
+ data-x="concept-appcache-onlinesafelist">online safelist namespaces.When a fallback namespace and an online whitelist namespace overlap, the online whitelist namespace has priority.
+ data-x="concept-appcache-onlinesafelist">online safelist namespace overlap, the online safelist namespace has priority. -The online whitelist wildcard
+ The online safelist wildcard
flag is applied last, only for URLs that match neither the online whitelist namespace nor the online safelist namespace nor the fallback namespace and that are not listed in the
explicit section.
The MIME type of the resource is ignored — it is assumed to @@ -84864,11 +84864,11 @@ NETWORK: and the URLs of the fallback entries that they map to, in new cache.
-Store the URLs that form the new online - whitelist in new cache.
Store the URLs that form the new online + safelist in new cache.
Store the value of the new online - whitelist wildcard flag in new cache.
Store the value of the new online + safelist wildcard flag in new cache.
Store the value of the new cache mode flag in new cache.
If there is an entry in the application cache's online whitelist that has the same + data-x="concept-appcache-onlinesafelist">online safelist that has the same origin as the resource's URL and that is a prefix match for the resource's URL, then fetch the resource normally and abort these steps.
If the application cache's online whitelist wildcard flag is + data-x="concept-appcache-onlinesafelist-wildcard">online safelist wildcard flag is open, then fetch the resource normally and abort these steps.
Fail the resource load as if there had been a generic network error.
The above algorithm ensures that so long as the online whitelist wildcard flag is + data-x="concept-appcache-onlinesafelist-wildcard">online safelist wildcard flag is blocking, resources that are not present in the manifest will always fail to load (at least, after the application cache has been primed the first time), making the testing of offline @@ -85313,7 +85313,7 @@ NETWORK:
How quotas are presented to the user is not defined by this specification. User agents are encouraged to provide features such as allowing a user to indicate that certain sites are trusted to use more than the default quota, e.g. by presenting a non-modal user interface - while a cache is being updated, or by having an explicit whitelist in the user agent's + while a cache is being updated, or by having an explicit safelist in the user agent's configuration interface.
@@ -89091,7 +89091,7 @@ scheduleWork(); // queues a task to do lots of workUser agents are expected to disable this method in certain cases to avoid user annoyance (e.g. as part of their popup blocker feature). For instance, a user agent could - require that a site be white-listed before enabling this method, or the user agent could be + require that a site be safelisted before enabling this method, or the user agent could be configured to only allow one modal dialog at a time.
@@ -89723,13 +89723,13 @@ interface NavigatorContentUtils { will never match anything, since schemes don't contain colons.If the registerProtocolHandler()
- method is invoked with a scheme that is neither a whitelisted scheme nor a scheme
+ method is invoked with a scheme that is neither a safelisted scheme nor a scheme
whose value starts with the substring "web+
" and otherwise contains only
lowercase ASCII letters, and whose length is at least five characters (including
the "web+
" prefix), the user agent must throw a SecurityError
exception.
The following schemes are the whitelisted schemes:
+The following schemes are the safelisted schemes:
bitcoin
If the registerContentHandler()
- method is invoked with a MIME type that is in the type blacklist or
+ method is invoked with a MIME type that is in the type blocklist or
that the user agent has deemed a privileged type, the user agent must throw a
SecurityError
exception.
The following MIME types are in the type - blacklist:
+ blocklist:User agents may allow sites to access session storage areas in an unrestricted manner, but require the user to authorise access @@ -96750,15 +96750,15 @@ dictionary StorageEventInit : EventInit {
If this information is then used to present the view of data currently in persistent storage, it would allow the user to make informed decisions about which parts of the persistent storage - to prune. Combined with a blacklist ("delete this data and prevent this domain from ever storing + to prune. Combined with a blocklist ("delete this data and prevent this domain from ever storing data again"), the user can restrict the use of persistent storage to sites that he trusts.
User agents may allow users to share their persistent storage domain blacklists.
+User agents may allow users to share their persistent storage domain blocklists.
This would allow communities to act together to protect their privacy.
@@ -118000,6 +118000,7 @@ INSERT INTERFACES HERE Andy Earnshaw, Andy Heydon, Andy Palay, + Anjana Vakil, Anthony Boyd, Anthony Bryan, Anthony Hickson,