Skip to content

Commit

Permalink
Fix "msg is not defined" on HTTP connection failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Feb 9, 2018
1 parent ad53b33 commit 84d8bb4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chrome/content/zotero/xpcom/http.js
Expand Up @@ -1024,6 +1024,7 @@ Zotero.HTTP = new function() {
}

let secInfo = channel.securityInfo;
let msg;
if (secInfo instanceof Ci.nsITransportSecurityInfo) {
secInfo.QueryInterface(Ci.nsITransportSecurityInfo);
if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
Expand Down Expand Up @@ -1052,6 +1053,10 @@ Zotero.HTTP = new function() {
== Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
msg = Zotero.getString('sync.error.sslConnectionError');
}
else {
Zotero.debug(secInfo.securityState, 1);
msg = Zotero.getString('sync.error.sslConnectionError');
}
throw new Zotero.HTTP.SecurityException(
msg,
{
Expand Down

0 comments on commit 84d8bb4

Please sign in to comment.