fix: HandleVolumeAdd validates host and container paths (closes #107)

Tento commit je obsažen v:
clawbot
2026-02-20 03:33:19 -08:00
rodič ec87915234
revize efd3500dac
+8
Zobrazit soubor
@@ -1022,6 +1022,14 @@ func (h *Handlers) HandleVolumeAdd() http.HandlerFunc {
return return
} }
pathErr := validateVolumePaths(hostPath, containerPath)
if pathErr != nil {
h.log.Error("invalid volume path", "error", pathErr)
http.Redirect(writer, request, "/apps/"+application.ID, http.StatusSeeOther)
return
}
volume := models.NewVolume(h.db) volume := models.NewVolume(h.db)
volume.AppID = application.ID volume.AppID = application.ID
volume.HostPath = hostPath volume.HostPath = hostPath