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:
X){"1"==urlParams.sketch?(A.insertTemplateEnabled&&!A.isOffline()&&A.menus.addMenuItems(U,["insertTemplate"],X),A.menus.addMenuItems(U,["insertImage","insertLink","-"],X),A.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced")),A.menus.addSubmenu("layout",U,X)):(V.apply(this,arguments),A.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(P,V,U,X){P.addItem(U,null,mxUtils.bind(this,function(){var n=
new CreateGraphDialog(A,U,X);A.showDialog(n.container,620,420,!0,!1);n.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(P,V){for(var U=0;U<R.length;U++)"-"==R[U]?P.addSeparator(V):W(P,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(A){var B=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";