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:
Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=f){a.style.cursor="wait";var d=a.innerHTML;a.innerHTML=mxResources.get("loading")+
"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=d;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};