1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Check that filename matches ID in csaf_uploader

This commit is contained in:
Bernhard Herzog 2023-05-11 13:54:42 +02:00
parent 5b4c621616
commit 821f018a98

View file

@ -243,6 +243,11 @@ func (p *processor) uploadRequest(filename string) (*http.Request, error) {
writeStrings("Errors:", errs)
return nil, errors.New("local schema check failed")
}
eval := util.NewPathEval()
if err := util.IDMatchesFilename(eval, doc, filepath.Base(filename)); err != nil {
return nil, err
}
}
body := new(bytes.Buffer)