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:
g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=l?l:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==l||
"none"==l,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var l=d;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+