Give appropriate error messages when the user tries to use an blank master password. Fixes #4341

This commit is contained in:
Richard Yen
2019-10-25 13:55:07 +01:00
committed by Dave Page
parent 2182dc3cc5
commit 30e9673375
3 changed files with 18 additions and 10 deletions

View File

@@ -605,7 +605,7 @@ define('pgadmin.browser', [
/* OK Button */
self.set_master_password(
$('#frmMasterPassword #password').val(),
parentDialog.set_callback,
true,parentDialog.set_callback,
);
} else if(event.index == 2) {
/* Cancel button */
@@ -677,12 +677,13 @@ define('pgadmin.browser', [
});
},
set_master_password: function(password='', set_callback=()=>{}) {
set_master_password: function(password='', button_click=false, set_callback=()=>{}) {
let data=null, self = this;
if(password != null || password!='') {
data = JSON.stringify({
'password': password,
'button_click': button_click,
});
}