fix: only allow valid uids

This commit is contained in:
Barış Soner Uşaklı
2020-06-23 15:47:10 -04:00
parent 4f6b6c5631
commit 00d8ce2663

View File

@@ -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]]');
}