Fixed issue where setting password was faulty on entering channel a second time

This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-02 11:38:02 +01:00
parent 5145b8d03c
commit 084550d84c
3 changed files with 10 additions and 7 deletions

View File

@@ -198,8 +198,7 @@ var Crypt = {
return conf_arr.remote;
},
crypt_pass: function(pass) {
Crypt.tmp_pass = pass;
crypt_chat_pass: function(pass) {
var key = btoa(socket.id) + btoa(socket.id);
key = key.substring(0,32);
key = btoa(key);
@@ -217,6 +216,11 @@ var Crypt = {
return encrypted.toString() + "$" + iv;
},
crypt_pass: function(pass) {
Crypt.tmp_pass = pass;
return Crypt.crypt_chat_pass(pass);
},
makeiv: function() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";