[Openvas-commits] r11684 - in trunk/gsa: . src/html
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Sep 26 10:00:47 CEST 2011
Author: hdoreau
Date: 2011-09-26 10:00:46 +0200 (Mon, 26 Sep 2011)
New Revision: 11684
Modified:
trunk/gsa/ChangeLog
trunk/gsa/src/html/omp.xsl
Log:
* src/html/omp.xsl (nvt): Add links to the CVE details dialog.
(get_info_cve_lnk): Add an optional gsa_token parameter, to let the
caller set the value if not available from within the template.
Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog 2011-09-26 07:10:23 UTC (rev 11683)
+++ trunk/gsa/ChangeLog 2011-09-26 08:00:46 UTC (rev 11684)
@@ -1,5 +1,11 @@
2011-09-26 Henri Doreau <henri.doreau at greenbone.net>
+ * src/html/omp.xsl (nvt): Add links to the CVE details dialog.
+ (get_info_cve_lnk): Add an optional gsa_token parameter, to let the
+ caller set the value if not available from within the template.
+
+2011-09-26 Henri Doreau <henri.doreau at greenbone.net>
+
* src/html/omp.xsl (get_cve_details, get_cpe_details): Make item name
unclickable to prevent these recursive links to confuse users.
Modified: trunk/gsa/src/html/omp.xsl
===================================================================
--- trunk/gsa/src/html/omp.xsl 2011-09-26 07:10:23 UTC (rev 11683)
+++ trunk/gsa/src/html/omp.xsl 2011-09-26 08:00:46 UTC (rev 11684)
@@ -8283,8 +8283,17 @@
<xsl:template name="get_info_cve_lnk">
<xsl:param name="cve"/>
- <a href="/omp?cmd=get_info&info_type=cve&info_name={$cve}&token={/envelope/token}"
- title="Details"><xsl:value-of select="$cve"/></a>
+ <xsl:param name="gsa_token"/>
+ <xsl:choose>
+ <xsl:when test="$gsa_token = ''">
+ <a href="/omp?cmd=get_info&info_type=cve&info_name={$cve}&token={/envelope/token}"
+ title="Details"><xsl:value-of select="$cve"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="/omp?cmd=get_info&info_type=cve&info_name={$cve}&token={$gsa_token}"
+ title="Details"><xsl:value-of select="$cve"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="get_info_response">
@@ -8464,7 +8473,20 @@
<xsl:when test="cve_id = 'NOCVE'">
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="cve_id"/>
+ <!-- get the GSA token before entering the for-each loop over the str:tokenize elements -->
+ <xsl:variable name="gsa_token" select="/envelope/token"/>
+
+ <xsl:for-each select="str:tokenize (cve_id, ', ')">
+ <xsl:call-template name="get_info_cve_lnk">
+ <xsl:with-param name="cve">
+ <xsl:value-of select="text()"/>
+ </xsl:with-param>
+ <xsl:with-param name="gsa_token">
+ <xsl:value-of select="$gsa_token"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</td>
More information about the Openvas-commits
mailing list