Compare commits
1 Commits
v0.3.1-bet
...
v0.3.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8af6d25e28 |
@@ -105,6 +105,12 @@ func (s *Server) handleTerminalWS(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore invalid shell paths (e.g., single characters from race condition)
|
||||
if len(shell) <= 1 {
|
||||
conn.WriteJSON(wsMessage{Type: "error", Data: "invalid shell config"})
|
||||
return
|
||||
}
|
||||
|
||||
if _, err := os.Stat(shell); err != nil {
|
||||
conn.WriteJSON(wsMessage{Type: "error", Data: fmt.Sprintf("shell not found: %s", shell)})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user