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:
DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,f=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){c.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};c.addListener("connectionArrowsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),
a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){c.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};c.addListener("connectionPointsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){c.actions.get("guides").funct()},
{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};c.addListener("guidesEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})));return a};