make sure password setting is set before checking length

This commit is contained in:
Stephen Birarda 2016-04-11 11:56:47 -07:00
parent b758acb7d8
commit aad98cc25d

View file

@ -870,7 +870,7 @@ function saveSettings() {
// 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) {
if (password && password.length > 0) {
formJSON["security"]["http_password"] = sha256_digest(password);
}
}