mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
chore(display): disable restricted shell
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@ func StartWebServer(v string) {
|
|||||||
e.GET("/", indexRoute)
|
e.GET("/", indexRoute)
|
||||||
e.GET("/sse", sseRoute)
|
e.GET("/sse", sseRoute)
|
||||||
e.GET("/splash", func(ctx echo.Context) error {
|
e.GET("/splash", func(ctx echo.Context) error {
|
||||||
return ctx.HTML(http.StatusOK, shared.SplashScreenTemplate)
|
return ctx.HTML(http.StatusOK, shared.SplashScreenTemplate)
|
||||||
})
|
})
|
||||||
|
|
||||||
apiGroup := e.Group("/api")
|
apiGroup := e.Group("/api")
|
||||||
@@ -147,7 +147,7 @@ func shellCommandRoute(ctx echo.Context) error {
|
|||||||
return ctx.JSON(http.StatusBadRequest, ErrorResponse{Error: "Invalid JSON request"})
|
return ctx.JSON(http.StatusBadRequest, ErrorResponse{Error: "Invalid JSON request"})
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("bash", "-c", "-r", commandInput.Command)
|
cmd := exec.Command("bash", "-c", commandInput.Command)
|
||||||
storagePath, err := pkg.GetStoragePath()
|
storagePath, err := pkg.GetStoragePath()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("Failed to get storage path", "error", err)
|
slog.Error("Failed to get storage path", "error", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user