Trim usernames
Previously it was possible to "impersonate" (to those not looking closely) other users by putting whitespace before or after the name of choice. This commit eliminates that.
This commit is contained in:
@@ -527,6 +527,7 @@ export default class WSServer {
|
||||
if (!newName) {
|
||||
client.assignGuestName(this.getUsernameList());
|
||||
} else {
|
||||
newName = newName.trim();
|
||||
if (hadName && newName === oldname) {
|
||||
//@ts-ignore
|
||||
client.sendMsg(guacutils.encode("rename", "0", "0", client.username, client.rank));
|
||||
|
||||
Reference in New Issue
Block a user