From 47b083eaca79ad854b05adb44227e76528ff3bcf Mon Sep 17 00:00:00 2001
From: Jeremy Long
Date: Wed, 7 May 2014 19:29:52 -0400
Subject: [PATCH] fixed display bug when only one CPE exists for a given CVE
Former-commit-id: 970b24e3f4d3203f17dc1269cec4156c98479d3a
---
.../main/resources/templates/HtmlReport.vsl | 37 +++++++++++++------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
index 2f37cfe31..b6acdf190 100644
--- a/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
+++ b/dependency-check-core/src/main/resources/templates/HtmlReport.vsl
@@ -668,13 +668,20 @@ arising out of or in connection with the use of this tool, the analysis performe
#end
- Vulnerable Software & Versions: (show all)
- - $enc.html($vuln.matchedCPE) #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end
- - ...
- #foreach($vs in $vuln.getVulnerableSoftware())
- - $enc.html($vs.name) #if($vs.hasPreviousVersion()) and all previous versions#end
+
+ #if ($vuln.getVulnerableSoftware().size()<2)
+ Vulnerable Software & Versions:
+ #else
+ Vulnerable Software & Versions: (show all)
+ - $enc.html($vuln.matchedCPE) #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end
+ - ...
+ #foreach($vs in $vuln.getVulnerableSoftware())
+ - $enc.html($vs.name) #if($vs.hasPreviousVersion()) and all previous versions#end
+ #end
+
#end
-
#end
#end
@@ -796,13 +803,19 @@ arising out of or in connection with the use of this tool, the analysis performe
#end
- Vulnerable Software & Versions: (show all)
- - $enc.html($vuln.matchedCPE) #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end
- - ...
- #foreach($vs in $vuln.getVulnerableSoftware())
- - $enc.html($vs.name) #if($vs.hasPreviousVersion()) and all previous versions#end
+ #if ($vuln.getVulnerableSoftware().size()<2)
+ Vulnerable Software & Versions:
+ #else
+ Vulnerable Software & Versions: (show all)
+ - $enc.html($vuln.matchedCPE) #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end
+ - ...
+ #foreach($vs in $vuln.getVulnerableSoftware())
+ - $enc.html($vs.name) #if($vs.hasPreviousVersion()) and all previous versions#end
+ #end
+
#end
-
#end
#end