isValidShell checks if the shell is an allowed one
(validShells []string, shell string)
| 274 | |
| 275 | // isValidShell checks if the shell is an allowed one |
| 276 | func isValidShell(validShells []string, shell string) bool { |
| 277 | for _, validShell := range validShells { |
| 278 | if validShell == shell { |
| 279 | return true |
| 280 | } |
| 281 | } |
| 282 | return false |
| 283 | } |
| 284 | |
| 285 | // WaitForTerminal is called from apihandler.handleAttach as a goroutine |
| 286 | // Waits for the SockJS connection to be opened by the client the session to be Bound in handleTerminalSession |