mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Better hiding of passwords, hiding cookie-logins better
This commit is contained in:
@@ -698,8 +698,10 @@ module.exports = function() {
|
||||
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
|
||||
if(userpass != "" || obj.pass == undefined) {
|
||||
obj.pass = userpass;
|
||||
} else {
|
||||
obj.pass = crypto.createHash('sha256').update(Functions.decrypt_string(obj.pass)).digest("base64")
|
||||
}
|
||||
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (obj.hasOwnProperty('pass') && docs[0].userpass == crypto.createHash('sha256').update(Functions.decrypt_string(obj.pass)).digest("base64")))) {
|
||||
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (obj.hasOwnProperty('pass') && docs[0].userpass == obj.pass))) {
|
||||
Functions.check_inlist(coll, guid, socket, offline, undefined, "place 4");
|
||||
List.send_play(coll, socket);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user