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