Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Send isSecure false instead of null when an insecure site has passive…
Browse files Browse the repository at this point in the history
… mixed content

Fix #9652

If a site is already insecure and receives passive mixed content, the security state should remain insecure instead of changing to unknown.

Test Plan:
1. go to https://video.foxbusiness.com/v/5068842750001/?#sp=show-clips
2. click 'allow ads' so that the video will play
3. the URL bar icon should not disappear when the video starts
  • Loading branch information
diracdeltas committed Jun 27, 2017
1 parent d142b24 commit 3935f58
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/renderer/components/frame/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,11 @@ class Frame extends React.Component {
isSecure = false
const parsedUrl = urlParse(this.props.location)
ipc.send(messages.CHECK_CERT_ERROR_ACCEPTED, parsedUrl.host, this.props.frameKey)
} else if (this.props.isSecure !== false &&
['warning', 'passive-mixed-content'].includes(e.securityState)) {
} else if (['warning', 'passive-mixed-content'].includes(e.securityState)) {
// Passive mixed content should not upgrade an insecure connection to a
// partially-secure connection. It can only downgrade a secure
// connection.
isSecure = 1
isSecure = this.props.isSecure !== false ? 1 : false
}
windowActions.setSecurityState(this.frame, {
secure: runInsecureContent ? false : isSecure,
Expand Down

0 comments on commit 3935f58

Please sign in to comment.