1
0
mirror of https://github.com/shazow/ssh-chat.git synced 2025-04-17 09:22:21 +03:00

Strip control characters from metadata inputs ()

This commit is contained in:
goose121 2018-01-02 18:27:54 -07:00 committed by Andrey Petrov
parent 2078e13819
commit fd77009f8d

@ -17,7 +17,7 @@ func SanitizeName(s string) string {
return s
}
var reStripData = regexp.MustCompile("[^[:ascii:]]")
var reStripData = regexp.MustCompile("[^[:ascii:]]|[[:cntrl:]]")
// SanitizeData returns a string with only allowed characters for client-provided metadata inputs.
func SanitizeData(s string) string {