mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-06-07 10:53:07 +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
|
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.
|
// SanitizeData returns a string with only allowed characters for client-provided metadata inputs.
|
||||||
func SanitizeData(s string) string {
|
func SanitizeData(s string) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user