mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-17 09:22:21 +03:00
Strip control characters from metadata inputs (#257)
This commit is contained in:
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user