mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Only create/update index.txt, changes.csv, security.txt when configured. (#210)
* Change default to not write index.txt, changes.csv and security.txt (for provider and aggregator) * Add config file options to reenable writing.
This commit is contained in:
parent
3a3ef7a961
commit
20f5937240
8 changed files with 51 additions and 23 deletions
|
|
@ -322,11 +322,14 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := updateIndices(
|
||||
folder, filepath.Join(year, newCSAF),
|
||||
ex.CurrentReleaseDate,
|
||||
); err != nil {
|
||||
return err
|
||||
// Only write index.txt and changes.csv if configured.
|
||||
if c.cfg.WriteIndices {
|
||||
if err := updateIndices(
|
||||
folder, filepath.Join(year, newCSAF),
|
||||
ex.CurrentReleaseDate,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Take over publisher
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue