Language: JavaScript
Label: vulnerable
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var l=this.editor.graph,q=l.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));l.model.isEdge(d)&&