brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Fix #8096: Add blocked page interstitial #8589

Closed cuba closed 7 months ago

cuba commented 9 months ago

Summary of Changes

This pull request fixes #8096

When blocking document type requests we can intercept them and show a nice error message instead of a blank screen. Later we can add a "continue anyways" button but that is a little more complicated because it requires rewriting content blocker rules and likely some brave core changes if we want to store the exceptions on that side. So I left this out for now.

Could also generalize the CSS (and perhaps even the html) as it follows the latest designs which will need to be used for our other interstitials:

security review: https://github.com/brave/reviews/issues/1474

Submitter Checklist:

Test Plan:

  1. Go to adcash.com
  2. Ensure the interstitial page is appearing

Screenshots:

Simulator Screenshot - iPhone 15 Pro - 2023-12-21 at 11 34 12

Reviewer Checklist:

iccub commented 9 months ago

Tests seems to need a fix now