laptop and a wrench

漏洞

The ConvertWebMapToMapDocument function fails to authenticate via a server connection file for certain service types.

上次发布: November 13, 2019 ArcGIS GIS Server
漏洞 ID 编号 BUG-000126389
已提交October 29, 2019
上次修改时间June 5, 2024
适用范围ArcGIS GIS Server
找到的版本10.6.1
状态Will Not Be Addressed

附加信息

It is strongly recommended to move to a ArcGIS Pro based print service.

解决办法

For secured services, generate a token to supply within the Web Map json. For example:

def get_token(portal, username, password):

  token_url = '%s/sharing/rest/generateToken/' % portal

  params = {'f': 'json', 'username': username, 'password': password, 'client' : 'referer','referer': portal}

  req = urllib2.Request(token_url, urllib.urlencode(params))

  try:

    response = urllib2.urlopen(req)

  except:

    context = ssl._create_unverified_context()

    response = urllib2.urlopen(req, context=context)

  token = str(json.load(response)['token'])

  return token

username = "siteadmin"

password = "siteadmin"

portal = "https://earl.esri.com/portal"

token = get_token(portal, username, password)

webmap_json = str({"mapOptions":{"showAttribution":False,"extent":{"xmin":-13528474.13135027,"ymin":4075245.077838606,"xmax":-13076884.168241667,"ymax":4219558.18724095,"spatialReference":{"wkid":102100,"latestWkid":3857}},"spatialReference":{"wkid":102100,"latestWkid":3857},"scale":1155581.108577},"operationalLayers":[{"id":"asterPrint_9733","title":"asterPrint_9733","opacity":1,"minScale":0,"maxScale":0,"url":"https://emedina1.esri.com/image/rest/services/asterPrint/ImageServer", "token":token}],"exportOptions":{"outputSize":[746,575],"dpi":96}})

重现步骤

漏洞 ID: BUG-000126389

软件:

  • ArcGIS GIS Server

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项