Files
codeql/go/ql/test/query-tests/Security/CWE-078/ArgumentInjection.go
2022-11-18 09:43:17 +01:00

13 lines
177 B
Go

package main
import (
"net/http"
"os/exec"
)
func handler2(req *http.Request) {
path := req.URL.Query()["path"][0]
cmd := exec.Command("rsync", path, "/tmp")
cmd.Run()
}