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:
StorageFile.prototype.saveFile=function(b,e,f,c){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var l=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var u=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:u.length,lastModified:Date.now(),type:this.type},{title:this.title,data:u}],l,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
u,l)}catch(x){null!=c&&c(x)}else null!=c&&c()}),["filesInfo","files"])}catch(x){null!=c&&c(x)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){this.isRenamable()&&this.getTitle()!=b&&null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),k,c):k()}),c)}else null!=f&&f()};