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

Commit

Permalink
Merge pull request #12743 from brave/fix/12742
Browse files Browse the repository at this point in the history
Fix displayed mixed content status
  • Loading branch information
darkdh committed Jan 22, 2018
1 parent 96f38ed commit b7748e6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/renderer/components/frame/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,16 +682,17 @@ class Frame extends React.Component {
if (e.securityState === 'secure') {
isSecure = true
} else if (e.securityState === 'insecure') {
isSecure = false
// Passive mixed content should not upgrade an insecure connection to a
// partially-secure connection. It can only downgrade a secure
// connection.
isSecure =
e.securityInfo.mixedContentStatus === 'content-status-displayed' && this.props.isSecure !== false
? 1
: false
} else if (e.securityState === 'broken') {
isSecure = false
const parsedUrl = urlParse(this.props.location)
ipc.send(messages.CHECK_CERT_ERROR_ACCEPTED, parsedUrl.host, this.props.tabId)
} 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 = this.props.isSecure !== false ? 1 : false
}
windowActions.setSecurityState(this.props.tabId, {
secure: runInsecureContent ? false : isSecure,
Expand Down

0 comments on commit b7748e6

Please sign in to comment.