fix #1166: prevent webdav password logging

This commit is contained in:
antelle 2019-08-17 11:39:22 +02:00
parent 2c064989c1
commit 0d126ae0d8
1 changed files with 6 additions and 1 deletions

View File

@ -730,7 +730,12 @@ const AppModel = Backbone.Model.extend({
if (storage && Storage[storage].getPathForName && (!path || storage !== file.get('storage'))) {
path = Storage[storage].getPathForName(file.get('name'));
}
logger.info('Sync started', storage, path, options);
const optionsForLogging = _.clone(options);
if (optionsForLogging && optionsForLogging.opts && optionsForLogging.opts.password) {
optionsForLogging.opts = _.clone(optionsForLogging.opts);
optionsForLogging.opts.password = '***';
}
logger.info('Sync started', storage, path, optionsForLogging);
let fileInfo = this.getFileInfo(file);
if (!fileInfo) {
logger.info('Create new file info');