brave / brave-ios

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

Fix #8664: Add content blocker to upgrade passive mixed content #8680

Closed kylehickinson closed 8 months ago

kylehickinson commented 8 months ago

Summary of Changes

This pull request fixes #8664

Submitter Checklist:

Test Plan:

Note: Due to a WebKit bug (https://bugs.webkit.org/show_bug.cgi?id=258711) the app will still display the "Not Secure" triangle even if all http content is promoted to https.

Reviewer Checklist:

iccub commented 8 months ago

Let's sec review it

stoletheminerals commented 8 months ago

I get .mixedContent warning here as well https://stoletheminerals.github.io/mixedcontent.html. Do we check for mixed content before auto-upgrading?

stoletheminerals commented 8 months ago

Same on Booking. I can see that links were upgraded to HTTPS, but the warning is still there.

image
kylehickinson commented 8 months ago

@stoletheminerals Seems like there may a race condition somewhere in the logic that updates the UI, when I attach the debugger and run through the results I actually see even very.badssl.com no longer shows as not secure (along with your test site).

kylehickinson commented 8 months ago

Seems like there is a bug in WebKit here, where hasOnlySecureContent does not update to true when http content is promoted to https via content blocker. Open WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=258711