chromium / suspicious-site-reporter

Extension for reporting suspicious sites to Safe Browsing.
Apache License 2.0
96 stars 22 forks source link

referrer.forEach can be undefined leading to popup script error #34

Open ericlaw1979 opened 5 years ago

ericlaw1979 commented 5 years ago

image

ericlaw1979 commented 5 years ago

I suspect this is due to chrome.safeBrowsingPrivate.getReferrerChain returning null in Edge.

Is this something we (Edge) have done wrong, or is this the expected behavior of getReferrerChain in browsers without SafeBrowsing?

livvielin commented 5 years ago

Ah this might be why issue #35 occurs. I'd have to check on what the expected behavior is (though I note that turning off Safe Browsing in Chromium just ended up crashing the extension, which isn't great), but regardless I think we should add a condition that only calls the forEach if the referrer is non-null.