fix: only allow valid uids

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 4f6b6c5631
commit 00d8ce2663

@ -162,7 +162,7 @@ module.exports = function (SocketUser) {
throw new Error('[[error:invalid-uid]]');
}
if (!data || !data.uid) {
if (!data || !(parseInt(data.uid, 10) > 0)) {
throw new Error('[[error:invalid-data]]');
}

Loading…
Cancel
Save