more ensurance id is string

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-26 11:30:05 +02:00
parent 4e874b79fb
commit 0bef149269
2 changed files with 4 additions and 1 deletions

View File

@@ -158,6 +158,7 @@ function skip(list, guid, coll, offline, socket) {
socket.emit('update_required', result);
return;
}
list.id = list.id + "";
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
if(adminpass != "" || list.pass == undefined) {
list.pass = adminpass;
@@ -592,6 +593,8 @@ function end(obj, coll, guid, offline, socket) {
socket.emit("update_required", result);
return;
}
obj.id = obj.id + "";
id = id + "";
var callback_function = function() {
for(var i = 0; i < arguments.length; i++) {
if(typeof(arguments[i]) == "function") {

View File

@@ -507,7 +507,7 @@ function add_function(arr, coll, guid, offline, socket) {
function voteUndecided(msg, coll, guid, offline, socket) {
var socketid = socket.zoff_id;
if(typeof(msg) === 'object' && msg !== undefined && msg !== null){
if(msg.hasOwnProperty("id")) msg.id = msg.id + "";
if(!msg.hasOwnProperty("channel") || !msg.hasOwnProperty("id") ||
!msg.hasOwnProperty("type") || typeof(msg.channel) != "string" ||
typeof(msg.id) != "string" || typeof(msg.type) != "string") {