Merge pull request #887 from adomasven/fix/hide-password-in-debug-output

Hide password in debug output of key request
This commit is contained in:
Dan Stillman 2015-12-20 11:45:36 -05:00
commit 84a6ea18f6

View file

@ -109,6 +109,7 @@ Zotero.HTTP = new function() {
if (options.body && typeof options.body == 'string') {
var bodyStart = options.body.substr(0, 1024);
// Don't display sync password or session id in console
bodyStart = bodyStart.replace(/password":"[^"]+/, 'password":"********');
bodyStart = bodyStart.replace(/password=[^&]+/, 'password=********');
bodyStart = bodyStart.replace(/sessionid=[^&]+/, 'sessionid=********');