From 84d8bb40201affc1f57dab0eb0d5bb5a418c0001 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 9 Feb 2018 02:34:52 -0500 Subject: [PATCH] Fix "msg is not defined" on HTTP connection failure --- chrome/content/zotero/xpcom/http.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index e6ce06dda..655de0447 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -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) @@ -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, {