Loading browser/components/enterprisepolicies/Policies.jsm +2 −1 Original line number Diff line number Diff line Loading @@ -2528,9 +2528,10 @@ let ChromeURLBlockPolicy = { ) { return Ci.nsIContentPolicy.ACCEPT; } let contentLocationSpec = contentLocation.spec.toLowerCase(); if ( gBlockedAboutPages.some(function(aboutPage) { return contentLocation.spec.startsWith(aboutPage); return contentLocationSpec.startsWith(aboutPage.toLowerCase()); }) ) { return Ci.nsIContentPolicy.REJECT_POLICY; Loading browser/components/enterprisepolicies/helpers/WebsiteFilter.jsm +4 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,10 @@ let WebsiteFilter = { let url = contentLocation.spec; if (contentLocation.scheme == "view-source") { url = contentLocation.pathQueryRef; } else if (url.startsWith("about:reader")) { url = decodeURIComponent(url.substr("about:reader?url=".length)); } else if (url.toLowerCase().startsWith("about:reader")) { url = decodeURIComponent( url.toLowerCase().substr("about:reader?url=".length) ); } if ( contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT || Loading browser/components/enterprisepolicies/tests/browser/browser_policy_block_about.js +5 −5 Original line number Diff line number Diff line Loading @@ -9,25 +9,25 @@ const policiesToTest = [ policies: { BlockAboutAddons: true, }, urls: ["about:addons"], urls: ["about:addons", "about:ADDONS"], }, { policies: { BlockAboutConfig: true, }, urls: ["about:config"], urls: ["about:config", "about:Config"], }, { policies: { BlockAboutProfiles: true, }, urls: ["about:profiles"], urls: ["about:profiles", "about:pRofiles"], }, { policies: { BlockAboutSupport: true, }, urls: ["about:support"], urls: ["about:support", "about:suPPort"], }, { policies: { Loading Loading @@ -66,7 +66,7 @@ add_task(async function testAboutTask() { policyJSON.policies = policyToTest.policies; for (let url of policyToTest.urls) { if (url.startsWith("about")) { let feature = url.split(":")[1]; let feature = url.split(":")[1].toLowerCase(); let aboutModule = Cc[ABOUT_CONTRACT + feature].getService( Ci.nsIAboutModule ); Loading browser/components/enterprisepolicies/tests/browser/browser_policy_websitefilter.js +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ add_task(async function test_http() { "about:reader?url=" + SUPPORT_FILES_PATH + BLOCKED_PAGE, true ); await checkBlockedPage( "about:READER?url=" + SUPPORT_FILES_PATH + BLOCKED_PAGE, true ); await checkBlockedPage(SUPPORT_FILES_PATH + EXCEPTION_PAGE, false); }); Loading Loading
browser/components/enterprisepolicies/Policies.jsm +2 −1 Original line number Diff line number Diff line Loading @@ -2528,9 +2528,10 @@ let ChromeURLBlockPolicy = { ) { return Ci.nsIContentPolicy.ACCEPT; } let contentLocationSpec = contentLocation.spec.toLowerCase(); if ( gBlockedAboutPages.some(function(aboutPage) { return contentLocation.spec.startsWith(aboutPage); return contentLocationSpec.startsWith(aboutPage.toLowerCase()); }) ) { return Ci.nsIContentPolicy.REJECT_POLICY; Loading
browser/components/enterprisepolicies/helpers/WebsiteFilter.jsm +4 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,10 @@ let WebsiteFilter = { let url = contentLocation.spec; if (contentLocation.scheme == "view-source") { url = contentLocation.pathQueryRef; } else if (url.startsWith("about:reader")) { url = decodeURIComponent(url.substr("about:reader?url=".length)); } else if (url.toLowerCase().startsWith("about:reader")) { url = decodeURIComponent( url.toLowerCase().substr("about:reader?url=".length) ); } if ( contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT || Loading
browser/components/enterprisepolicies/tests/browser/browser_policy_block_about.js +5 −5 Original line number Diff line number Diff line Loading @@ -9,25 +9,25 @@ const policiesToTest = [ policies: { BlockAboutAddons: true, }, urls: ["about:addons"], urls: ["about:addons", "about:ADDONS"], }, { policies: { BlockAboutConfig: true, }, urls: ["about:config"], urls: ["about:config", "about:Config"], }, { policies: { BlockAboutProfiles: true, }, urls: ["about:profiles"], urls: ["about:profiles", "about:pRofiles"], }, { policies: { BlockAboutSupport: true, }, urls: ["about:support"], urls: ["about:support", "about:suPPort"], }, { policies: { Loading Loading @@ -66,7 +66,7 @@ add_task(async function testAboutTask() { policyJSON.policies = policyToTest.policies; for (let url of policyToTest.urls) { if (url.startsWith("about")) { let feature = url.split(":")[1]; let feature = url.split(":")[1].toLowerCase(); let aboutModule = Cc[ABOUT_CONTRACT + feature].getService( Ci.nsIAboutModule ); Loading
browser/components/enterprisepolicies/tests/browser/browser_policy_websitefilter.js +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ add_task(async function test_http() { "about:reader?url=" + SUPPORT_FILES_PATH + BLOCKED_PAGE, true ); await checkBlockedPage( "about:READER?url=" + SUPPORT_FILES_PATH + BLOCKED_PAGE, true ); await checkBlockedPage(SUPPORT_FILES_PATH + EXCEPTION_PAGE, false); }); Loading