mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 04:12:09 +02:00
convert password to base64 before settings post
This commit is contained in:
parent
5054243655
commit
13a3b47d1b
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue