Closed Bug 2056606 Opened 1 month ago Closed 1 month ago

Add live support for policy WebsiteFilter

Categories

(Enterprise Products :: Firefox, enhancement, P1)

enhancement

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: janika, Assigned: janika)

References

Details

Attachments

(1 file)

No description provided.
Severity: -- → S1
Priority: -- → P1
Type: task → enhancement
Assignee: nobody → jneuberger
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

Test Plan

Use https://example.com/ and https://example.org/ as test sites, one in each tab.

How to verify the result of each test case

  1. about:policies#active — lists WebsiteFilter and its current Block/Exceptions value.
  2. Navigation indicator — on a site the policy blocks, navigating to it shows the " Access to this site is restricted" error page (see about:neterror?e=blockedByPolicyEnterprise); on a site the policy does not block, the page loads normally. Reload the tab after each policy change to observe it.

At every step, confirm the navigation result reflects the change after a reload, without restarting the browser.

Use two tabs throughout: one on https://example.com, one on https://example.org.

Test cases

1. Apply
  1. Confirm WebsiteFilter is not active and both example.com and example.org load normally.
  2. In the console, set WebsiteFilter:
{
  "Block": ["*://*.example.com/*"]
}

Expected:

  1. In about:policies#active: WebsiteFilter listed with the value above.
  2. example.com shows the blocked error page; example.org still loads normally.
2. Update I
  1. Change Block to example.org:
{
  "Block": ["*://*.example.org/*"]
}

Expected:

  1. In about:policies#active: WebsiteFilter updated to block example.org.
  2. example.com loads normally again and example.org now shows the blocked error page.
3. Update II
  1. Switch to an allowlist by blocking everything except example.org via Exceptions:
{
  "Block": ["<all_urls>"],
  "Exceptions": ["*://*.example.org/*"]
}

Expected:

  1. In about:policies#active: WebsiteFilter updated to the block-all + exception value.
  2. The policy now applies to every site except example.org: example.com shows the blocked error page and example.org loads normally.
4. Update III
  1. Set Block back to example.com:
{
  "Block": ["*://*.example.com/*"]
}
  1. Navigate to a URL that HTTP-redirects (30x) into example.com — e.g. https://httpbin.org/redirect-to?url=https://example.com/.

Expected:

  1. In about:policies#active: WebsiteFilter updated to block example.com.
  2. The redirecting URL lands on the blocked error page.
5. Remove
  1. Remove WebsiteFilter from the policy set.

Expected:

  1. In about:policies#active: WebsiteFilter no longer listed.
  2. example.com (and every other site) loads normally again, including the redirecting URL from the previous step.
Flags: qe-verify+

Verified fixed using FxE 155.0a1 (20260807105404) on Windows 10, MacOS 26 and Ubuntu 24.
Test-case added here.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: