Summary
Game server crashes when mentions[0] is undefined in whisper message handling.
Affected Code
server-game/src/client.js:351-353
if (mentions[0]) {
this.room.packChat(output, text, this.id, Comm.Chat.whisper);
mentions[0].forEach(player => { // CRASH if mentions is [undefined]
Vulnerability
If mentions[0] is explicitly undefined (array containing undefined), forEach crashes.
Impact
- Game server crash on whisper
- Denial of service
Recommended Fix
if (mentions[0] && Array.isArray(mentions[0])) {
mentions[0].forEach(player => {
References
Summary
Game server crashes when
mentions[0]is undefined in whisper message handling.Affected Code
server-game/src/client.js:351-353Vulnerability
If
mentions[0]is explicitlyundefined(array containing undefined),forEachcrashes.Impact
Recommended Fix
References