mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-10-22 23:52:12 +03:00
Strip control characters from metadata inputs (#257)
This commit is contained in:
1 parent
2078e13819
commit
fd77009f8d
1 file changed
+1
-1
+1
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user