Skip to content

Commit

Permalink
Merge pull request mozilla#12040 from wojtekmaj/replace-non-inclusive
Browse files Browse the repository at this point in the history
Replace non-inclusive "whitelist" term with "allowlist"
  • Loading branch information
brendandahl committed Jul 1, 2020
2 parents ec635b8 + 78970bb commit fe3df49
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extensions/chromium/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function updateObjectElement(elem) {
// attribute reloads the content (provided that the type was correctly set).
// - When <object type=text/html data="chrome-extension://..."> is used
// (tested with a data-URL, data:text/html,<object...>, the extension's
// origin whitelist is not set up, so the viewer can't load the PDF file.
// origin allowlist is not set up, so the viewer can't load the PDF file.
// - The content of the <object> tag may be affected by <param> tags.
//
// To make sure that our solution works for all cases, we will insert a frame
Expand Down
2 changes: 1 addition & 1 deletion extensions/chromium/extension-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
*/
function parseExtensionURL(url) {
url = url.substring(CRX_BASE_URL.length);
// Find the (url-encoded) colon and verify that the scheme is whitelisted.
// Find the (url-encoded) colon and verify that the scheme is allowed.
var schemeIndex = url.search(/:|%3A/i);
if (schemeIndex === -1) {
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function isSameOrigin(baseUrl, otherUrl) {
return base.origin === other.origin;
}

// Checks if URLs use one of the whitelisted protocols, e.g. to avoid XSS.
// Checks if URLs use one of the allowed protocols, e.g. to avoid XSS.
function _isValidProtocol(url) {
if (!url) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/util_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ describe("util", function () {
expect(createValidAbsoluteUrl("/foo", "/bar")).toEqual(null);
});

it("handles URLs that do not use a whitelisted protocol", function () {
it("handles URLs that do not use an allowed protocol", function () {
expect(createValidAbsoluteUrl("magnet:?foo", null)).toEqual(null);
});

it("correctly creates a valid URL for whitelisted protocols", function () {
it("correctly creates a valid URL for allowed protocols", function () {
// `http` protocol
expect(
createValidAbsoluteUrl("http://www.mozilla.org/foo", null)
Expand Down

0 comments on commit fe3df49

Please sign in to comment.