Ensure 'userName' has _something_ if sanatized all the way out

This commit is contained in:
Bryan Ashby 2018-12-09 00:17:03 -07:00
parent fd59a8512b
commit a8604ece54
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ module.exports = class Door {
node : exeInfo.node.toString(), node : exeInfo.node.toString(),
srvPort : this.sockServer ? this.sockServer.address().port.toString() : '-1', srvPort : this.sockServer ? this.sockServer.address().port.toString() : '-1',
userId : this.client.user.userId.toString(), userId : this.client.user.userId.toString(),
userName : sanatizeFilename(this.client.user.username), userName : sanatizeFilename(this.client.user.username) || `user${this.client.user.userId.toString()}`,
userNameRaw : this.client.user.username, userNameRaw : this.client.user.username,
cwd : cwd, cwd : cwd,
}; };