convert password to base64 before settings post

This commit is contained in:
Stephen Birarda 2016-04-05 11:26:57 -07:00
parent 5054243655
commit 13a3b47d1b

View file

@ -867,6 +867,14 @@ function saveSettings() {
// grab a JSON representation of the form via form2js
var formJSON = form2js('settings-form', ".", false, cleanupFormValues, true);
// check if we've set the basic http password - if so convert it to base64
if (formJSON["security"]) {
var password = formJSON["security"]["http_password"];
if (password.length > 0) {
formJSON["security"]["http_password"] = btoa(password);
}
}
console.log(formJSON);
// re-enable all inputs