diff --git a/src/js/restore.js b/src/js/restore.js index 4d2acbe3f..9d18af0f4 100644 --- a/src/js/restore.js +++ b/src/js/restore.js @@ -1,8 +1,6 @@ 'use strict'; -/* global angular */ -/* global tld */ -/* global $ */ +/* global $, angular, tld, SECRET_PLACEHOLDER */ // create main application module var app = angular.module('Application', ['pascalprecht.translate', 'ngCookies', 'angular-md5', 'ui-notification', 'ui.bootstrap']); @@ -425,6 +423,9 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien Object.keys(backupConfig).forEach(function (k) { if (k in $scope) $scope[k] = backupConfig[k]; }); + + // this allows the config to potentially have a raw password (though our UI sets it to placeholder) + if ($scope.mountOptions.password === SECRET_PLACEHOLDER) $scope.mountOptions.password = ''; }); }; reader.readAsText(event.target.files[0]);