laptop and a wrench

漏洞

Updating the item data with the BytesIO object returns the error message "Error 409: Item with file already exists".

ArcGIS API for Python
漏洞 ID 编号 BUG-000161855
已提交October 4, 2023
上次修改时间June 5, 2024
适用范围ArcGIS API for Python
找到的版本N/A
操作系统Windows Server
操作系统版本N/A
状态Non-Reproducible

附加信息

This issue is not reproducible.

解决办法

Currently, the fileName is resolved as follows in src/arcgis/gis/__init__.py:14909

           if data is not None and isinstance(data, (io.StringIO, io.BytesIO)):

               if item_properties is None:

                   item_properties =

               if not "type" in item_properties:

                   item_properties["type"] = self.type

               if not "fileName" in item_properties:

                   fileName = self.name

                   item_properties["fileName"] = fileName

Consider using a random filename, or appending a timestamp to the end of the itemId as a filename.

           if data is not None and isinstance(data, (io.StringIO, io.BytesIO)):

               if item_properties is None:

                   item_properties =

               if not "type" in item_properties:

                   item_properties["type"] = self.type

               if not "fileName" in item_properties:

                   fileName = f"self.name_str(round((datetime.now()).timestamp()))"

                   item_properties["fileName"] = fileName

重现步骤

漏洞 ID: BUG-000161855

软件:

  • ArcGIS API for Python

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项