mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Check that filename matches ID in csaf_provider
This commit is contained in:
parent
c37b127d82
commit
6a91c29baf
1 changed files with 5 additions and 0 deletions
|
|
@ -196,6 +196,11 @@ func (c *controller) upload(r *http.Request) (any, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if util.CleanFileName(ex.ID) != newCSAF {
|
||||||
|
return nil, fmt.Errorf("ID %q does not match filename %s",
|
||||||
|
ex.ID, newCSAF)
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we have to search for dynamic categories.
|
// Check if we have to search for dynamic categories.
|
||||||
var dynamicCategories []string
|
var dynamicCategories []string
|
||||||
if catExprs := c.cfg.DynamicCategories(); len(catExprs) > 0 {
|
if catExprs := c.cfg.DynamicCategories(); len(catExprs) > 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue