Skip to content

Commit

Permalink
Do not allow xsltproc to access network or files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmacvicar committed Oct 31, 2018
1 parent 22b6ac6 commit 7551401
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libvirt/utils_xslt.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ func transformXML(xml string, xslt string) (string, error) {
log.Fatal(err)
}

cmd := exec.Command("xsltproc", xsltFile.Name(), xmlFile.Name())
cmd := exec.Command("xsltproc",
"--nomkdir",
"--nonet",
"--nowrite",
xsltFile.Name(),
xmlFile.Name())
transformedXML, err := cmd.Output()
if err != nil {
return xml, err
Expand Down

0 comments on commit 7551401

Please sign in to comment.