Language: JavaScript
Label: vulnerable
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:
DrawioFile.prototype.autosave=function(b,e,g,p){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var y=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==y&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var q=this.isAutosaveRevision();
q&&(this.lastAutosaveRevision=(new Date).getTime());this.save(q,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=g&&g(E)}),mxUtils.bind(this,function(E){null!=p&&p(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(E){null!=p&&p(E)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"delay",b,"saving",this.savingFile);this.autosaveThread=y};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};