mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
checker: Ensure that the processor is reset before checking each domain. (#523)
This commit is contained in:
parent
6c8b3757aa
commit
9a1c66eb8e
1 changed files with 4 additions and 3 deletions
|
|
@ -202,8 +202,8 @@ func (p *processor) close() {
|
|||
}
|
||||
}
|
||||
|
||||
// clean clears the fields values of the given processor.
|
||||
func (p *processor) clean() {
|
||||
// reset clears the fields values of the given processor.
|
||||
func (p *processor) reset() {
|
||||
p.redirects = nil
|
||||
p.noneTLS = nil
|
||||
for k := range p.alreadyChecked {
|
||||
|
|
@ -247,6 +247,8 @@ func (p *processor) run(domains []string) (*Report, error) {
|
|||
}
|
||||
|
||||
for _, d := range domains {
|
||||
p.reset()
|
||||
|
||||
if !p.checkProviderMetadata(d) {
|
||||
// We cannot build a report if the provider metadata cannot be parsed.
|
||||
log.Printf("Could not parse the Provider-Metadata.json of: %s\n", d)
|
||||
|
|
@ -287,7 +289,6 @@ func (p *processor) run(domains []string) (*Report, error) {
|
|||
domain.Passed = rules.eval(p)
|
||||
|
||||
report.Domains = append(report.Domains, domain)
|
||||
p.clean()
|
||||
}
|
||||
|
||||
return &report, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue