mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Check that filename matches ID in csaf_uploader
This commit is contained in:
parent
5b4c621616
commit
821f018a98
1 changed files with 5 additions and 0 deletions
|
|
@ -243,6 +243,11 @@ func (p *processor) uploadRequest(filename string) (*http.Request, error) {
|
||||||
writeStrings("Errors:", errs)
|
writeStrings("Errors:", errs)
|
||||||
return nil, errors.New("local schema check failed")
|
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)
|
body := new(bytes.Buffer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue