Language: JavaScript
Label: safe
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:
function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,H=!1;y.forEach(function(G,aa){G=
aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):X=this.importXml(O,g,m,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&