Bug 30290

Summary: Log mixed content warnings to console
Product: WebKit Reporter: Collin Jackson <collinj>
Component: WebCore Misc.Assignee: Collin Jackson <collinj>
Status: RESOLVED FIXED    
Severity: Enhancement CC: abarth, commit-queue
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: https://crypto.stanford.edu/~collinj/research/mixed-content/
Attachments:
Description Flags
patch none

Description Collin Jackson 2009-10-11 17:19:44 PDT
Mixed content warnings are often hard to debug, since the insecure content is buried in some obscure stylesheet or iframe. 

By logging information about a mixed content event as a console warning, we can make removing mixed content easier for site developers.

The most important pieces of information that we can log are the URL of the page that's attempting to include insecure content, and the URL of the content.

I'm not sure if the console message type should be error or warning, but I'm leaning towards warning. Chrome used a warning before the mixed content detection was moved into WebKit.
Comment 1 Collin Jackson 2009-10-11 17:22:35 PDT
Created attachment 41009 [details]
patch

I ran the existing mixed content http tests and they passed.
Comment 2 Adam Barth 2009-10-11 19:49:50 PDT
Comment on attachment 41009 [details]
patch

Thanks Collin!
Comment 3 WebKit Commit Bot 2009-10-11 20:15:18 PDT
Comment on attachment 41009 [details]
patch

Clearing flags on attachment: 41009

Committed r49431: <http://trac.webkit.org/changeset/49431>
Comment 4 WebKit Commit Bot 2009-10-11 20:15:22 PDT
All reviewed patches have been landed.  Closing bug.