- Remove overriding OPTIONS response to text/plain -- the problem is incorrect status codes generated by IIS that result in "No element found" errors
- Replace passwords in malformed XML messages when generating error reports
This commit is contained in:
parent
1619491157
commit
eac0c1a94d
|
@ -903,7 +903,6 @@ Zotero.Utilities.HTTP = new function() {
|
|||
xmlhttp.onreadystatechange = function() {
|
||||
_stateChange(xmlhttp, callback);
|
||||
};
|
||||
xmlhttp.overrideMimeType("text/plain");
|
||||
xmlhttp.send(null);
|
||||
return xmlhttp;
|
||||
}
|
||||
|
@ -973,7 +972,6 @@ Zotero.Utilities.HTTP = new function() {
|
|||
};
|
||||
|
||||
xmlhttp.send(body);
|
||||
|
||||
return xmlhttp;
|
||||
}
|
||||
|
||||
|
|
|
@ -598,8 +598,17 @@ var Zotero = new function(){
|
|||
}
|
||||
}
|
||||
|
||||
// Remove password in malformed XML messages
|
||||
if (msg.category == 'malformed-xml') {
|
||||
try {
|
||||
// msg.message is read-only, so store separately
|
||||
var altMessage = msg.message.replace(/(file: "https?:\/\/[^:]+:)([^@]+)(@[^"]+")/, "$1********$3");
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
|
||||
if (asStrings) {
|
||||
errors.push(msg.message)
|
||||
errors.push(altMessage ? altMessage : msg.message)
|
||||
}
|
||||
else {
|
||||
errors.push(msg);
|
||||
|
|
Loading…
Reference in New Issue
Block a user