mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-23 23:35:24 +00:00
* Fix 'reference' info nil pointer dereference. (#4005) * test path update * test fixes --------- Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
This commit is contained in:
parent
03bdd24fb9
commit
5ab39fca25
@ -18,9 +18,9 @@ var templatesPathTestCases = []TestCaseInfo{
|
|||||||
//cwd
|
//cwd
|
||||||
{Path: "./dns/cname-fingerprint.yaml", TestCase: &cwdTemplateTest{}},
|
{Path: "./dns/cname-fingerprint.yaml", TestCase: &cwdTemplateTest{}},
|
||||||
//relative path
|
//relative path
|
||||||
{Path: "dns/cname-fingerprint.yaml", TestCase: &relativePathTemplateTest{}},
|
{Path: "dns/dns-saas-service-detection.yaml", TestCase: &relativePathTemplateTest{}},
|
||||||
//absolute path
|
//absolute path
|
||||||
{Path: fmt.Sprintf("%v/dns/cname-fingerprint.yaml", getTemplatePath()), TestCase: &absolutePathTemplateTest{}},
|
{Path: fmt.Sprintf("%v/dns/dns-saas-service-detection.yaml", getTemplatePath()), TestCase: &absolutePathTemplateTest{}},
|
||||||
}
|
}
|
||||||
|
|
||||||
type cwdTemplateTest struct{}
|
type cwdTemplateTest struct{}
|
||||||
|
|||||||
@ -113,7 +113,7 @@ func CreateReportDescription(event *output.ResultEvent, formatter ResultFormatte
|
|||||||
}
|
}
|
||||||
|
|
||||||
reference := event.Info.Reference
|
reference := event.Info.Reference
|
||||||
if !reference.IsEmpty() {
|
if reference != nil && !reference.IsEmpty() {
|
||||||
builder.WriteString("\nReferences: \n")
|
builder.WriteString("\nReferences: \n")
|
||||||
|
|
||||||
referenceSlice := reference.ToSlice()
|
referenceSlice := reference.ToSlice()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user