Fixed issue with password not being set correctly

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-05 15:53:13 +02:00
parent 9d06c2bda7
commit 7714729093
4 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -309,8 +309,9 @@ var Admin = {
removeplay = form.removeplay.checked;
skipping = form.skip.checked;
shuffling = form.shuffle.checked;
var pass_send = userpass == '' ? userpass : CryptoJS.SHA256(userpass).toString();
configs = {
voting: voting, addsongs: addsongs, longsongs: longsongs, frontpage: frontpage, allvideos: allvideos, removeplay: removeplay, adminpass: adminpass, skipping: skipping, shuffling: shuffling, userpass: CryptoJS.SHA256(userpass).toString(), userpass_changed: userpass_changed
voting: voting, addsongs: addsongs, longsongs: longsongs, frontpage: frontpage, allvideos: allvideos, removeplay: removeplay, adminpass: adminpass, skipping: skipping, shuffling: shuffling, userpass: pass_send, userpass_changed: userpass_changed
};
Crypt.set_userpass(chan.toLowerCase(), CryptoJS.SHA256(userpass).toString());

View File

@@ -715,6 +715,7 @@ io.on('connection', function(socket){
var skipping = params.skipping;
var shuffling = params.shuffling;
var userpass = params.userpass;
if((!params.userpass_changed && frontpage) || (!params.userpass_changed && userpass == "")) {
userpass = "";
} else if(params.userpass_changed && userpass != "") {