Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
function(d){var g=A.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh();this.restoreOpenLibraries()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh();this.restoreOpenLibraries()}));return g};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:
d[g].expand)};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),n=this.getSelectionState(),q=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());