laptop and a wrench

漏洞

The WMS GetFeatureInfo operation in the text/plain format returns a http 400 error when no features are found.

ArcGIS GIS Server
漏洞 ID 编号 BUG-000175021
已提交March 13, 2025
上次修改时间May 22, 2025
适用范围ArcGIS GIS Server
找到的版本11.3
操作系统Windows Server
操作系统版本2019 64 Bit
修正版本11.5, 3.5
状态Fixed

附加信息

This issue is addressed in 11.5, 3.5

解决办法

The file “featureinfo_text_plain.xsl” under “...\ArcGIS\Server\framework\runtime\ArcGIS\Resources\Styles\WMS” was adapted to also receive a response in the case of features not found. The file was modified as follows:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:esri_wms="http://www.esri.com/wms" xmlns="http://www.esri.com/wms">

  <xsl:output method="text" indent="no" encoding="ISO-8859-1" omit-xml-declaration="yes"/>

  <xsl:variable name="newline">

    <xsl:text>

    </xsl:text>

  </xsl:variable>

  <xsl:template match="/">   

    <xsl:choose>

      <xsl:when test="esri_wms:FeatureInfoResponse/esri_wms:FeatureInfoCollection">

        <xsl:for-each select="esri_wms:FeatureInfoResponse/esri_wms:FeatureInfoCollection">@<xsl:value-of select="@layername"/><xsl:value-of select="$newline"/>

          <xsl:for-each select="esri_wms:FeatureInfo[1]/esri_wms:Field"><xsl:value-of select="esri_wms:FieldName"/>;</xsl:for-each><xsl:value-of select="$newline"/>

          <xsl:for-each select="esri_wms:FeatureInfo">

            <xsl:for-each select="esri_wms:Field"><xsl:value-of select="esri_wms:FieldValue"/>;</xsl:for-each><xsl:value-of select="$newline"/>

          </xsl:for-each>

        </xsl:for-each>

      </xsl:when>

      <xsl:otherwise>

        <xsl:text>The request is not allowed.</xsl:text>

      </xsl:otherwise>

    </xsl:choose>

  </xsl:template>

</xsl:stylesheet>

重现步骤

漏洞 ID: BUG-000175021

软件:

  • ArcGIS GIS Server

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项