Also check length
authorunc0rr
Sat, 23 Mar 2013 21:32:14 +0400
changeset 8780 486edbbe72b5
parent 8776 ef64fd1f79a7
child 8783 f1231a48fc48
Also check length
gameServer/Utils.hs
--- a/gameServer/Utils.hs	Fri Mar 22 22:42:41 2013 +0100
+++ b/gameServer/Utils.hs	Sat Mar 23 21:32:14 2013 +0400
@@ -56,7 +56,7 @@
             t : replaceTeam tm ts
 
 illegalName :: B.ByteString -> Bool
-illegalName s = B.null s || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
+illegalName s = B.null s || B.length s > 40 || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
     where
         isIllegalChar c = c `List.elem` "$()*+?[]^{|}"