Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3118 closed defect (fixed)

Brackets in servername cause errors in multiplayer lobby

Reported by: elexis Owned by: leper
Priority: Must Have Milestone: Alpha 19
Component: Multiplayer lobby Keywords:
Cc: Patch:

Description

Today and yesterday everybody that joined the a18 lobby had errors appearing:

ERROR: Invalid tag 'Fe(CN)6' at 27 in '[color="255 0 0"]K4[Fe(CN)6][/color]'
ERROR: Invalid tag 'Fe(CN)6' at 10 in 'K4[Fe(CN)6]'

A quick search in wireshark for 'K4[Fe(CN)6]' reveals that someone used this string (the chemical formula for Potassium ferrocyanide) in his servername.

Reproduce: If one hosts a lobby game with brackets in the servername and joins the lobby with another account, the errors appear for that servername too.

The error is printed in gui/GUItext.cpp.

Solution: sanitize server names.

Attachments (1)

Screenshot from 2015-03-21 14:52:12.jpg (191.2 KB ) - added by elexis 9 years ago.
Also by adding '[color="0 0 255"]testcolor' to the servername one can change the displayed color of individual words. There are probably way more non intended things one could do here.

Download all attachments as: .zip

Change History (3)

by elexis, 9 years ago

Also by adding '[color="0 0 255"]testcolor' to the servername one can change the displayed color of individual words. There are probably way more non intended things one could do here.

comment:1 by leper, 9 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 16452:

Escape lobby game names. Fixes #3118.

comment:2 by leper, 9 years ago

In 16699:

Fix error message missed in r16452. Refs #3118.

Note: See TracTickets for help on using tickets.