laptop and a wrench

漏洞

ArcGIS API for JavaScript 4.3 SceneView WGS84 MapImageLayer requests send image request with real number size parameters.

上次发布: April 28, 2017 ArcGIS API for JavaScript
漏洞 ID 编号 BUG-000103574
已提交March 13, 2017
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本4.2
操作系统Windows OS
操作系统版本10.0 64 Bit
状态Known Limit

附加信息

No plans for implementing this workaround client-side as the problem only exists with legacy unsupported services (pre 10.1). Please continue to use the workaround provided initially.

解决办法

Subclass the MapImageLayer:var HeightFixMapImageLayer = MapImageLayer.createSubclass({ getImageUrl: function (options, callback) { console.log("options: ",options); var self = this, serviceUrl = this.parsedUrl.path + "/export"; // Fix the width if (!Number.isInteger(options.width)) { console.log("width is not an integer: " + options.width); options.width = parseInt(options.width); } // Fix the height if (!Number.isInteger(options.height)) { console.log("height is not an integer: " + options.height); options.height = parseInt(options.height); } // Following from the MapImageLayer.getImageUrl options = lang.mixin({}, this.parsedUrl.query, this.createExportImageParameters(options), { f: "image", token: this.token }); var url = serviceUrl + "?" + ioquery.objectToQuery(options); if (url.length > config.request.maxUrlLength) { options.f = "json"; request(serviceUrl, { query: options, responseType: "json", callbackParamName: "callback" }).then(function (a) { return a.data.href + (self.token ? "?token\x3d" + self.token : ""); }).then(callback); } else { callback(url); } } });

重现步骤

漏洞 ID: BUG-000103574

软件:

  • ArcGIS API for JavaScript

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项