isSingleHostPatternToken reports whether s is safe to write as a single SSH host pattern token. Whitespace or control characters could break out into additional SSH config directives.
(s string)
| 726 | // host pattern token. Whitespace or control characters could break out into |
| 727 | // additional SSH config directives. |
| 728 | func isSingleHostPatternToken(s string) bool { |
| 729 | return !strings.ContainsFunc(s, func(r rune) bool { |
| 730 | return unicode.IsSpace(r) || unicode.IsControl(r) |
| 731 | }) |
| 732 | } |
| 733 | |
| 734 | // ValidateWorkspaceHostnameSuffix validates a deployment-provided SSH hostname |
| 735 | // suffix before it is made available to clients. |
no outgoing calls
no test coverage detected