Fix "msg is not defined" on HTTP connection failure
This commit is contained in:
parent
ad53b3311e
commit
84d8bb4020
|
@ -1024,6 +1024,7 @@ Zotero.HTTP = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let secInfo = channel.securityInfo;
|
let secInfo = channel.securityInfo;
|
||||||
|
let msg;
|
||||||
if (secInfo instanceof Ci.nsITransportSecurityInfo) {
|
if (secInfo instanceof Ci.nsITransportSecurityInfo) {
|
||||||
secInfo.QueryInterface(Ci.nsITransportSecurityInfo);
|
secInfo.QueryInterface(Ci.nsITransportSecurityInfo);
|
||||||
if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||||
|
@ -1052,6 +1053,10 @@ Zotero.HTTP = new function() {
|
||||||
== Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
|
== Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
|
||||||
msg = Zotero.getString('sync.error.sslConnectionError');
|
msg = Zotero.getString('sync.error.sslConnectionError');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Zotero.debug(secInfo.securityState, 1);
|
||||||
|
msg = Zotero.getString('sync.error.sslConnectionError');
|
||||||
|
}
|
||||||
throw new Zotero.HTTP.SecurityException(
|
throw new Zotero.HTTP.SecurityException(
|
||||||
msg,
|
msg,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user